javeme commented on code in PR #2055:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2055#discussion_r1052385188


##########
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java:
##########
@@ -267,6 +251,25 @@ private static ConditionQuery 
newQueryFromRelations(ConditionQuery query,
         return cq;
     }
 
+    private static ImmutableList<ConditionQuery> 
flattenRelations(ConditionQuery query) {
+        Relations relations = new Relations();
+        List<Condition> noRelations = new ArrayList<>();
+        for (Condition condition : query.conditions()) {
+            if (condition.isRelation()) {
+                relations.add((Relation) condition);

Review Comment:
   ImmutableList => List\<ConditionQuery>



##########
hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java:
##########
@@ -193,7 +193,8 @@ public StandardHugeGraph(HugeConfig config) {
 
         this.taskManager = TaskManager.instance();
 
-        this.features = new HugeFeatures(this, true);
+        boolean supportsPersistence = 
!"memory".equals(config.get(CoreOptions.BACKEND));

Review Comment:
   can we get the BackendFeatures and init this.features after the 
`this.storeProvider = this.loadStoreProvider()`? such as at line 217



##########
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java:
##########
@@ -107,6 +107,7 @@ public static HugeGraph getGraph(Step<?, ?> step) {
     }
 
     public static HugeGraph tryGetGraph(Step<?, ?> step) {
+        // TODO: remove these EmptyGraph judgments when upgrading tinkerpop to 
a fixed version

Review Comment:
   can also add the issue url?



##########
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java:
##########
@@ -251,6 +251,25 @@ private static ConditionQuery 
newQueryFromRelations(ConditionQuery query,
         return cq;
     }
 
+    private static ImmutableList<ConditionQuery> 
flattenRelations(ConditionQuery query) {
+        Relations relations = new Relations();
+        List<Condition> noRelations = new ArrayList<>();

Review Comment:
   noRelations -- prefer nonRelations



-- 
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: dev-unsubscr...@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to