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 34295732d58263..04d92fdeb11132 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 @@ 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 00000000000000..12d0405600991c --- /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;" + +}