This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 1288676b68c [fix](nereids)change lag/lead function signature (#40161)
1288676b68c is described below
commit 1288676b68c7f3971dc4c092ac6969b24f5de293
Author: starocean999 <[email protected]>
AuthorDate: Fri Aug 30 12:05:47 2024 +0800
[fix](nereids)change lag/lead function signature (#40161)
## Proposed changes
pick from master https://github.com/apache/doris/pull/40060
<!--Describe your changes.-->
---
.../functions/window/RequireTrivialTypes.java | 2 --
.../nereids_syntax_p0/lag_lead_signature.groovy | 35 ++++++++++++++++++++++
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/RequireTrivialTypes.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/RequireTrivialTypes.java
index 34295732d58..04d92fdeb11 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/RequireTrivialTypes.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/window/RequireTrivialTypes.java
@@ -19,7 +19,6 @@ package
org.apache.doris.nereids.trees.expressions.functions.window;
import org.apache.doris.nereids.types.BigIntType;
import org.apache.doris.nereids.types.BooleanType;
-import org.apache.doris.nereids.types.CharType;
import org.apache.doris.nereids.types.DataType;
import org.apache.doris.nereids.types.DateTimeType;
import org.apache.doris.nereids.types.DateTimeV2Type;
@@ -64,7 +63,6 @@ public interface RequireTrivialTypes {
DateTimeV2Type.SYSTEM_DEFAULT,
TimeType.INSTANCE,
TimeV2Type.INSTANCE,
- CharType.SYSTEM_DEFAULT,
VarcharType.SYSTEM_DEFAULT,
StringType.INSTANCE
);
diff --git a/regression-test/suites/nereids_syntax_p0/lag_lead_signature.groovy
b/regression-test/suites/nereids_syntax_p0/lag_lead_signature.groovy
new file mode 100644
index 00000000000..12d04056009
--- /dev/null
+++ b/regression-test/suites/nereids_syntax_p0/lag_lead_signature.groovy
@@ -0,0 +1,35 @@
+// 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("lag_lead_signature") {
+ sql "SET enable_nereids_planner=true"
+ sql "SET enable_fallback_to_original_planner=false"
+ sql """drop table if exists lag_lead_signature_t"""
+ sql """ CREATE TABLE lag_lead_signature_t (
+ `k` VARCHAR(200) NULL
+ ) ENGINE=OLAP
+ DUPLICATE KEY(`k`)
+ DISTRIBUTED BY HASH(`k`) BUCKETS 3
+ PROPERTIES (
+ "replication_allocation" = "tag.location.default: 1"
+ );"""
+
+ sql "insert into lag_lead_signature_t values ('44'), ('28');"
+
+ sql "select lag(k, 1, 0) over(), lead(k, 1, 0) over() from
lag_lead_signature_t;"
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]