This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 feebe3e6fbe [FIX](literal) fix expression literal error #29157
feebe3e6fbe is described below
commit feebe3e6fbe05a57d38535efbafca825bfc68475
Author: amory <[email protected]>
AuthorDate: Thu Dec 28 23:08:01 2023 +0800
[FIX](literal) fix expression literal error #29157
---
.../apache/doris/analysis/ExpressionFunctions.java | 4 +++-
.../query_p0/literal_view/lietral_largeint.out | 10 ++++++++++
.../query_p0/literal_view/lietral_largeint.groovy | 22 ++++++++++++++++++++++
3 files changed, 35 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
index ea63a8ffabe..0ba9122373e 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
@@ -278,8 +278,10 @@ public enum ExpressionFunctions {
LiteralExpr[] exprs;
if (argType.isStringType()) {
exprs = new StringLiteral[args.size()];
- } else if (argType.isFixedPointType()) {
+ } else if (argType.isIntegerType()) {
exprs = new IntLiteral[args.size()];
+ } else if (argType.isLargeIntType()) {
+ exprs = new LargeIntLiteral[args.size()];
} else if (argType.isDateType()) {
exprs = new DateLiteral[args.size()];
} else if (argType.isDecimalV2() || argType.isDecimalV3()) {
diff --git a/regression-test/data/query_p0/literal_view/lietral_largeint.out
b/regression-test/data/query_p0/literal_view/lietral_largeint.out
new file mode 100644
index 00000000000..438ff771539
--- /dev/null
+++ b/regression-test/data/query_p0/literal_view/lietral_largeint.out
@@ -0,0 +1,10 @@
+-- This file is automatically generated. You should know what you did if you
want to edit this
+-- !sql --
+[1]
+
+-- !sql --
+[1, null]
+
+-- !sql --
+[1, null, 18446744073709551615]
+
diff --git
a/regression-test/suites/query_p0/literal_view/lietral_largeint.groovy
b/regression-test/suites/query_p0/literal_view/lietral_largeint.groovy
new file mode 100644
index 00000000000..7ba7e048b8f
--- /dev/null
+++ b/regression-test/suites/query_p0/literal_view/lietral_largeint.groovy
@@ -0,0 +1,22 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("literal_largeint") {
+ qt_sql "select array(cast(1 as LargeInt))"
+ qt_sql "select array(cast(1 as LargeInt), NULL)"
+ qt_sql "select array(cast(1 as LargeInt), NULL, cast(18446744073709551615
as LargeInt))"
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]