From 0daf9b3d352eb341cc0087c856a5d9562a74a274 Mon Sep 17 00:00:00 2001 From: zhaochangle Date: Mon, 1 Jul 2024 15:53:52 +0800 Subject: [PATCH] 1 --- fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 29f99b219aa78c..6bf11b0a953e90 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 @@ -271,7 +271,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) {