VGalaxies commented on code in PR #2662:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2662#discussion_r1766831865


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java:
##########
@@ -1815,6 +1883,17 @@ private boolean rightResultFromIndexQuery(Query query, 
HugeElement elem) {
         }
 
         ConditionQuery cq = (ConditionQuery) query;
+        if (cq.conditions().size() == 1 && cq.condition(HugeKeys.LABEL) != 
null && cq.resultType().isEdge()) {
+            // g.E().hasLabel(xxx)
+            return true;
+        }
+
+        if (cq.optimized() == OptimizedType.INDEX && 
cq.condition(HugeKeys.LABEL) != null && cq.resultType().isEdge()) {
+            // g.E().hasLabel(xxx).has(yyy)
+            // consider OptimizedType.INDEX_FILTER occurred in 
org.apache.hugegraph.core.EdgeCoreTest.testQueryCount
+            return true;
+        }
+

Review Comment:
   TBD.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to