diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java index 78ab6b341a23ff..4cd58f23650b52 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java @@ -269,7 +269,7 @@ public String toSqlImpl() { // 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) {