contrueCT commented on code in PR #2994:
URL: https://github.com/apache/hugegraph/pull/2994#discussion_r3627790867
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java:
##########
@@ -445,14 +445,34 @@ 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 unsafe labels and their sibling properties for local filtering.
+ for (HasContainer has : hasContainers) {
+ if (has.getKey().equals(T.label.getAccessor()) &&
Review Comment:
Fixed in `952d38e83`.
Both `HugeGraphStep` and `HugeVertexStep` extraction paths now pre-scan the
full `HasStep` / `NoOpBarrierStep` chain. If any holder contains an unsafe
LABEL predicate, the whole chain stays local, preventing partial property
pushdown in either predicate order.
I added vertex and edge regressions across a barrier with matches that exist
only on an unindexed label, plus optimization tests for both extraction paths
and both condition orders. Verification passed: `TraversalUtilOptimizeTest`
14/14 and the focused RocksDB vertex/edge regressions 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]