Closed li-boxuan closed 3 years ago
Hello Li, I am wondering if this issue still open?
@ruiyang00 Yes, it's still open. Feel free to work on it if you'd like to.
@li-boxuan Thank you, Li. I would love to work on this issue. Could you confirm that we should change the determineClass() to return Object.class data type directly to match the documentation? Thank you!
@ruiyang00 Nope - you should change the doc to match the code :-)
The doc on https://docs.janusgraph.org/basics/schema/#automatic-schema-maker says automatically created property key has data type Object.class
However, my testing shows that Default Schema Maker automatically infers the type of property key, and only uses data type Object.class when the given value is not of any native JanusGraph Data Type (Integer, String, etc.). See the relevant code snippet:
https://github.com/JanusGraph/janusgraph/blob/d0e5eff1de4e0dcdc95b6292ebe64a3baa357646/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/JanusGraphDefaultSchemaMaker.java#L44-L50 https://github.com/JanusGraph/janusgraph/blob/d0e5eff1de4e0dcdc95b6292ebe64a3baa357646/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/JanusGraphDefaultSchemaMaker.java#L58-L86