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


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStep.java:
##########
@@ -133,7 +133,7 @@ protected ConditionQuery constructEdgesQuery(
 
         Id vertex = (Id) traverser.get().id();
         Directions direction = Directions.convert(this.getDirection());
-        EdgeLabel[] els = graph.mapElName2El(this.getEdgeLabels());
+        Id[] els = graph.mapElName2Id(this.getEdgeLabels());

Review Comment:
   [P1] Preserve father/sub-label routing for child edge labels
   
   The removed EdgeLabel overload emitted LABEL=fatherId and SUB_LABEL=childId 
for a child label. mapElName2Id() maps the child to fatherId, but the new 
AdjacentEdgesQuery receives no child ID and emits no SUB_LABEL constraint. 
Consequently a simple child-only adjacency query can scan the parent prefix and 
return sibling-child edges. Ordinary non-index results bypass query.test(), and 
HugeVertexStep does not add a separate label filter when there are no 
has-containers.
   
   Please retain the schema-aware father/sub-label translation and add a 
child-label adjacency regression test with two sibling labels and an 
ordinary-label control. This finding is based on exact-head source tracing, not 
a live backend run.
   
   Correction: the original version of this comment incorrectly said 
mapElName2Id() passed childId and therefore queried the wrong child prefix. It 
passes fatherId; the missing sub-label constraint broadens the query instead.
   
   Mapping: 
https://github.com/apache/hugegraph/blob/7633d86ff5a2acffc216240ff6f0ff843133af8b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java#L302-L312



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