From 934d82816c35e4f98bf27b95e3025c41d4799271 Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:12:44 +0800 Subject: [PATCH] [fix](Nereids) add int type alias 'integer' (#25376) --- .../src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 | 2 +- .../src/main/java/org/apache/doris/nereids/types/DataType.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 index f22717e7f91f7b..b67e803be894c6 100644 --- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 +++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 @@ -723,7 +723,7 @@ dataType primitiveColType: | type=TINYINT | type=SMALLINT - | (SIGNED | UNSIGNED)? type=INT + | (SIGNED | UNSIGNED)? type=(INT | INTEGER) | type=BIGINT | type=LARGEINT | type=BOOLEAN diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java index 2b70aa7fc95b4f..2ef2f911de0e1c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java @@ -123,6 +123,7 @@ public static DataType convertPrimitiveFromStrings(List types, boolean u dataType = SmallIntType.INSTANCE; break; case "int": + case "integer": dataType = IntegerType.INSTANCE; break; case "bigint":