This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.1.2 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push: new 31b17bc1e5 [fix](update) Fix where clause is not reanalyzed after rewrite (#11723) 31b17bc1e5 is described below commit 31b17bc1e5527176dd121350d9548c414e0d4724 Author: Zhengguo Yang <yangz...@gmail.com> AuthorDate: Mon Aug 15 13:24:57 2022 +0800 [fix](update) Fix where clause is not reanalyzed after rewrite (#11723) --- .../java/org/apache/doris/analysis/UpdateStmt.java | 2 ++ .../datatype/date/test_date_in_predicate.groovy | 38 ---------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/UpdateStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/UpdateStmt.java index f40d99c318..52ef444d7f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/UpdateStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/UpdateStmt.java @@ -198,6 +198,8 @@ public class UpdateStmt extends DdlStmt { } whereExpr.analyze(analyzer); whereExpr = analyzer.getExprRewriter().rewrite(whereExpr, analyzer, ExprRewriter.ClauseType.WHERE_CLAUSE); + whereExpr.reset(); + whereExpr.analyze(analyzer); if (!whereExpr.getType().equals(Type.BOOLEAN)) { throw new AnalysisException("Where clause is not a valid statement return bool"); } diff --git a/regression-test/suites/datatype/date/test_date_in_predicate.groovy b/regression-test/suites/datatype/date/test_date_in_predicate.groovy deleted file mode 100644 index 6fc5c1dbac..0000000000 --- a/regression-test/suites/datatype/date/test_date_in_predicate.groovy +++ /dev/null @@ -1,38 +0,0 @@ - -// 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("test_date_in_predicate", "datatype") { - def tbName = "test_date_in_predicate" - sql "DROP TABLE IF EXISTS ${tbName}" - sql """ - CREATE TABLE IF NOT EXISTS ${tbName} ( - c0 int, - c1 char(10), - c2 date - ) - UNIQUE KEY(c0) - DISTRIBUTED BY HASH(c0) BUCKETS 5 properties("replication_num" = "1"); - """ - sql "insert into ${tbName} values(1, 'test1', '2000-01-01')" - sql "insert into ${tbName} values(2, 'test2', '2000-02-02')" - sql "insert into ${tbName} values(3, 'test3', '2000-03-02')" - - qt_sql1 "select * from ${tbName} where c2 in ('2000-02-02')" - qt_sql2 "select * from ${tbName} where c2 not in ('2000-02-02')" - sql "DROP TABLE ${tbName}" -} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org