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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new a3d60d0b50b Refactor UpdateStatementBinder (#32059)
a3d60d0b50b is described below

commit a3d60d0b50b6d371c877727a18110bb4cd3d226f
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Jul 10 23:50:46 2024 +0800

    Refactor UpdateStatementBinder (#32059)
---
 .../infra/binder/statement/dml/UpdateStatementBinder.java             | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/UpdateStatementBinder.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/UpdateStatementBinder.java
index 773519caa47..787cd51b138 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/UpdateStatementBinder.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/UpdateStatementBinder.java
@@ -24,7 +24,6 @@ import 
org.apache.shardingsphere.infra.binder.segment.from.TableSegmentBinderCon
 import org.apache.shardingsphere.infra.binder.segment.where.WhereSegmentBinder;
 import org.apache.shardingsphere.infra.binder.statement.SQLStatementBinder;
 import 
org.apache.shardingsphere.infra.binder.statement.SQLStatementBinderContext;
-import 
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.TableSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement;
 
 import java.util.Collections;
@@ -40,8 +39,7 @@ public final class UpdateStatementBinder implements 
SQLStatementBinder<UpdateSta
     public UpdateStatement bind(final UpdateStatement sqlStatement, final 
SQLStatementBinderContext binderContext) {
         UpdateStatement result = copy(sqlStatement);
         Map<String, TableSegmentBinderContext> tableBinderContexts = new 
LinkedHashMap<>();
-        TableSegment boundedTableSegment = 
TableSegmentBinder.bind(sqlStatement.getTable(), binderContext, 
tableBinderContexts, Collections.emptyMap());
-        result.setTable(boundedTableSegment);
+        result.setTable(TableSegmentBinder.bind(sqlStatement.getTable(), 
binderContext, tableBinderContexts, Collections.emptyMap()));
         sqlStatement.getAssignmentSegment().ifPresent(optional -> 
result.setSetAssignment(AssignmentSegmentBinder.bind(optional, binderContext, 
tableBinderContexts, Collections.emptyMap())));
         sqlStatement.getWhere().ifPresent(optional -> 
result.setWhere(WhereSegmentBinder.bind(optional, binderContext, 
tableBinderContexts, Collections.emptyMap())));
         return result;

Reply via email to