imbajin commented on code in PR #2994:
URL: https://github.com/apache/hugegraph/pull/2994#discussion_r3610056419


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java:
##########
@@ -445,14 +445,45 @@ private static boolean 
extractHasContainers(HugeVertexStep<?> newStep,
 
     private static boolean canExtractHasContainers(HugeGraph graph,
                                                    HasContainerHolder holder) {
-        for (HasContainer has : holder.getHasContainers()) {
+        List<HasContainer> hasContainers = holder.getHasContainers();
+        // Keep pure label non-EQ/IN predicates for TinkerPop filtering.
+        if (isPureLabelPredicateHolder(hasContainers)) {

Review Comment:
   ‼️ Keeping this non-EQ label holder in TinkerPop does not prevent a 
following property `HasStep` from being extracted. For `has(T.label, 
neq("author")).has("city", "Beijing")`, only the indexed `person.city` 
candidates are fetched, so the matching unindexed `fan` created by the new 
regression test can never reach the retained label filter. The latest memory, 
RocksDB, HBase, macOS, and HStore jobs all show the same test unexpectedly 
completing without `NoIndexException`, which is consistent with accepting this 
incomplete index plan. Please either keep the unsafe label predicate visible to 
backend planning so the partial plan is rejected, or stop extracting subsequent 
filters and use a complete candidate scan; then assert that the query either 
fails explicitly or returns every match including `fan`.



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