This is an automated email from the ASF dual-hosted git repository.
morrysnow 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 b0f773d17af [fix](Nereids) support update without filter (#33214)
b0f773d17af is described below
commit b0f773d17af550d64ce11599e373a1ee55f3cecd
Author: morrySnow <[email protected]>
AuthorDate: Wed Apr 3 19:04:10 2024 +0800
[fix](Nereids) support update without filter (#33214)
---
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 | 2 +-
.../main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
index 0b3a5b5c5b7..22fe3355fff 100644
--- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
+++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
@@ -69,7 +69,7 @@ statementBase
| explain? cte? UPDATE tableName=multipartIdentifier tableAlias
SET updateAssignmentSeq
fromClause?
- whereClause #update
+ whereClause? #update
| explain? cte? DELETE FROM tableName=multipartIdentifier
partitionSpec? tableAlias
(USING relations)?
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
index a9ba3603f53..bd6b404efc9 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
@@ -838,7 +838,7 @@ public class LogicalPlanBuilder extends
DorisParserBaseVisitor<Object> {
if (ctx.fromClause() != null) {
query = withRelations(query,
ctx.fromClause().relations().relation());
}
- query = withFilter(query, Optional.of(ctx.whereClause()));
+ query = withFilter(query, Optional.ofNullable(ctx.whereClause()));
String tableAlias = null;
if (ctx.tableAlias().strictIdentifier() != null) {
tableAlias = ctx.tableAlias().getText();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]