github-actions[bot] commented on code in PR #62956:
URL: https://github.com/apache/doris/pull/62956#discussion_r3205929461


##########
fe/fe-core/src/main/java/org/apache/doris/planner/NestedLoopJoinNode.java:
##########
@@ -103,6 +133,13 @@ protected void toThrift(TPlanNode msg) {
         }
         
msg.nested_loop_join_node.setIsOutputLeftSideOnly(isOutputLeftSideOnly);
         msg.nested_loop_join_node.setUseSpecificProjections(false);
+        if (hasMaterializedSlotIds) {
+            List<Integer> slotIds = new ArrayList<>();
+            for (SlotId slotId : materializedSlotIds) {
+                slotIds.add(slotId.asInt());

Review Comment:
   `materializedSlotIds` is a `HashSet`, but `toThrift()` serializes it by 
direct iteration and `EXPLAIN` does the same below. That makes otherwise 
identical nested-loop join plans produce nondeterministic 
`materialized_slot_ids` ordering across JVM runs, which can destabilize 
plan/explain output and any downstream comparison of generated thrift. Please 
preserve deterministic ordering, for example by storing these ids in insertion 
order (`LinkedHashSet`) or sorting by `SlotId.asInt()` before 
serializing/explaining.



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