You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/01/17 12:33:33 UTC
[doris] branch master updated: [fix](Nereids) add 'integer' as alias of int type (#15983)
This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 3d05ffb10e [fix](Nereids) add 'integer' as alias of int type (#15983)
3d05ffb10e is described below
commit 3d05ffb10e64845d2eca50eefd5940ddab0b5df7
Author: 谢健 <ji...@gmail.com>
AuthorDate: Tue Jan 17 20:33:26 2023 +0800
[fix](Nereids) add 'integer' as alias of int type (#15983)
---
.../src/main/java/org/apache/doris/nereids/types/DataType.java | 1 +
regression-test/suites/nereids_syntax_p0/function.groovy | 5 +++++
2 files changed, 6 insertions(+)
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 2547702e3e..a649352a8a 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
@@ -197,6 +197,7 @@ public abstract class DataType implements AbstractDataType {
return TinyIntType.INSTANCE;
case "smallint":
return SmallIntType.INSTANCE;
+ case "integer":
case "int":
return IntegerType.INSTANCE;
case "bigint":
diff --git a/regression-test/suites/nereids_syntax_p0/function.groovy b/regression-test/suites/nereids_syntax_p0/function.groovy
index a5398e200e..98398b4d9f 100644
--- a/regression-test/suites/nereids_syntax_p0/function.groovy
+++ b/regression-test/suites/nereids_syntax_p0/function.groovy
@@ -168,5 +168,10 @@ suite("nereids_function") {
) AS level
from window_funnel_test t;
"""
+
+ test {
+ sql "select cast(1.2 as integer);"
+ result([[1]])
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org