Bug Type (问题类型)
logic (逻辑设计问题)
Before submit
Environment (环境信息)
- Server Version: 1.7.0
- Backend: schema metadata reload paths; not backend-specific
- OS: N/A
- Data Size: N/A
Expected & Actual behavior (期望与实际表现)
Expected
Userdata.DEFAULT_VALUE (~default_value) should preserve the expected runtime type after schema metadata is serialized and reloaded.
For example, a PropertyKey with DataType.DATE should reload its default value as java.util.Date, not as a generic JSON String.
Actual
Schema userdata is deserialized through raw Map / Object paths, so Jackson cannot infer the original runtime type.
For ~default_value, a Date default value can be serialized as a formatted string and later reloaded as String.
This may affect multiple schema reload paths, including:
SchemaMetaManager -> PropertyKey.fromMap(...)
- JSON-based backend serializers such as Text/Binary/Table/Cassandra-style userdata reload paths
- the mirror userdata model in
hugegraph-struct
Possible fix direction
PropertyKey already knows its dataType, so ~default_value could be normalized after the PropertyKey is reconstructed, using the same conversion logic already used for property values.
Scope
- Investigate
Userdata.DEFAULT_VALUE reload behavior, especially for DataType.DATE.
- Normalize confirmed typed default values after schema reload.
- Check whether the same gap exists in
hugegraph-struct.
- Add regression tests for the confirmed reload path(s).
Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
Bug Type (问题类型)
logic (逻辑设计问题)
Before submit
Environment (环境信息)
Expected & Actual behavior (期望与实际表现)
Expected
Userdata.DEFAULT_VALUE(~default_value) should preserve the expected runtime type after schema metadata is serialized and reloaded.For example, a
PropertyKeywithDataType.DATEshould reload its default value asjava.util.Date, not as a generic JSONString.Actual
Schema userdata is deserialized through raw
Map/Objectpaths, so Jackson cannot infer the original runtime type.For
~default_value, aDatedefault value can be serialized as a formatted string and later reloaded asString.This may affect multiple schema reload paths, including:
SchemaMetaManager -> PropertyKey.fromMap(...)hugegraph-structPossible fix direction
PropertyKeyalready knows itsdataType, so~default_valuecould be normalized after thePropertyKeyis reconstructed, using the same conversion logic already used for property values.Scope
Userdata.DEFAULT_VALUEreload behavior, especially forDataType.DATE.hugegraph-struct.Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)