dpol1 opened a new issue, #3028:
URL: https://github.com/apache/hugegraph/issues/3028

   ### Bug Type (问题类型)
   
   logic (逻辑设计问题)
   
   ### Before submit
   
   - [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 
[FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have 
confirmed and searched that there are no similar problems in the historical 
issue and documents)
   
   ### 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 (问题点 / 边数据举例)
   
   ```javascript
   
   ```
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to