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


##########
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:
   Fixed in `23b996e30`.
   
   TinkerPop folds the adjacent label/property filters into one 
`HasContainerHolder` before this strategy runs. The extraction guard now keeps 
the whole holder local whenever it contains an unsafe label predicate, so the 
property filter can't be extracted into a partial index plan. The regression 
now asserts the complete result set, including the unindexed `fan`, for both 
predicate orders.
   
   Verified with the focused RocksDB label regressions (`VertexCoreTest` 7/7 
and `EdgeCoreTest` 3/3) and `TraversalUtilOptimizeTest` 12/12.



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