eldenmoon commented on code in PR #18654:
URL: https://github.com/apache/doris/pull/18654#discussion_r1191860729


##########
fe/fe-core/src/main/java/org/apache/doris/planner/OriginalPlanner.java:
##########
@@ -474,17 +482,35 @@ private void injectRowIdColumnSlot() {
                 node = node.getChildren().get(0);
             }
 
-            if (!(node instanceof OlapScanNode) || !(parent instanceof 
SortNode)) {
-                continue;
+            // case1
+            if ((node instanceof OlapScanNode) && (parent instanceof 
SortNode)) {
+                SortNode sortNode = (SortNode) parent;
+                OlapScanNode scanNode = (OlapScanNode) node;
+                SlotDescriptor slot = injectRowIdColumnSlot(analyzer, 
scanNode.getTupleDesc());
+                injectRowIdColumnSlot(analyzer, 
sortNode.getSortInfo().getSortTupleDescriptor());

Review Comment:
   injectRowIdColumnSlot is already a function, what's the benefit  to 
encapsulate them?



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