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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Alias.java:
##########
@@ -99,7 +99,7 @@ public Slot toSlot() throws UnboundException {
                 slotReference != null ? ((SlotReference) 
child()).getOriginalTable().orElse(null) : null,
                 slotReference != null ? 
slotReference.getOriginalColumn().orElse(null) : null,
                 slotReference != null ? ((SlotReference) 
child()).getOneLevelTable().orElse(null) : null,
-                slotReference != null ? 
slotReference.getOriginalColumn().orElse(null) : null,
+                slotReference != null ? 
slotReference.getOneLevelColumn().orElse(null) : null,

Review Comment:
   This only fixes the normal result-set metadata path that goes through 
`NereidsPlanner`/`FieldInfo`. Server-side prepared statements still use 
`PrepareCommandPlanner` + `StmtExecutor.sendStmtPrepareOK()`, and that path 
serializes `originalTable`/`originalColumn` directly 
(`StmtExecutor.java:1699-1713`, `StmtExecutor.java:1986-1993`). So 
`useServerPrepStmts=true` on a query like `select vk1 c2, vk1 from 
view_metadata` will still report the base table/column metadata instead of the 
view metadata. This needs the same `oneLevelTable`/`oneLevelColumn` handling, 
plus a regression that actually exercises `COM_STMT_PREPARE`.



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