[branch-2.1](stmt) fix show create table consistency #37074 (#37079)

pick #37074
This commit is contained in:
zclllyybb
2024-07-01 20:35:05 +08:00
committed by GitHub
parent 798d9d6fc6
commit 89b4918e88

View File

@ -269,7 +269,7 @@ public class SlotRef extends Expr {
// virtual slot of an alias function
// when we try to translate an alias function to Nereids style, the desc in the place holding slotRef
// is null, and we just need the name of col.
return col;
return "`" + col + "`";
} else if (desc.getSourceExprs() != null) {
if (!disableTableName && (ToSqlContext.get() == null || ToSqlContext.get().isNeedSlotRefId())) {
if (desc.getId().asInt() != 1) {