This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 9ce16c7701912bea9ea762bbd7f9933b6b6e3960
Author: starocean999 <40539150+starocean...@users.noreply.github.com>
AuthorDate: Fri Aug 30 10:56:25 2024 +0800

    [fix](nereids)change lag/lead function signature (#40060)
    
    remove CharType from the signature
---
 .../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..5dde98a95a0
--- /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;"
+
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to