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

duanzhengqiang 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 f88c4c339b3 Remove useless MergeStatementContext (#32101)
f88c4c339b3 is described below

commit f88c4c339b3201100586385b9702a329bf70d16b
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jul 14 20:52:06 2024 +0800

    Remove useless MergeStatementContext (#32101)
---
 .../statement/SQLStatementContextFactory.java      |  3 +-
 .../statement/dml/MergeStatementContext.java       | 33 ----------------------
 2 files changed, 1 insertion(+), 35 deletions(-)

diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/SQLStatementContextFactory.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/SQLStatementContextFactory.java
index 79cc3f79c8d..e13d2d7af44 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/SQLStatementContextFactory.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/SQLStatementContextFactory.java
@@ -59,7 +59,6 @@ import 
org.apache.shardingsphere.infra.binder.context.statement.dml.DoStatementC
 import 
org.apache.shardingsphere.infra.binder.context.statement.dml.InsertStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dml.LoadDataStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dml.LoadXMLStatementContext;
-import 
org.apache.shardingsphere.infra.binder.context.statement.dml.MergeStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dml.SelectStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dml.UpdateStatementContext;
 import 
org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException;
@@ -176,7 +175,7 @@ public final class SQLStatementContextFactory {
             return new LoadXMLStatementContext((LoadXMLStatement) 
sqlStatement, currentDatabaseName);
         }
         if (sqlStatement instanceof MergeStatement) {
-            return new MergeStatementContext((MergeStatement) sqlStatement);
+            return new UnknownSQLStatementContext(sqlStatement);
         }
         throw new UnsupportedSQLOperationException(String.format("Unsupported 
SQL statement `%s`", sqlStatement.getClass().getSimpleName()));
     }
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/MergeStatementContext.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/MergeStatementContext.java
deleted file mode 100644
index 3f346e497ad..00000000000
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/MergeStatementContext.java
+++ /dev/null
@@ -1,33 +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.
- */
-
-package org.apache.shardingsphere.infra.binder.context.statement.dml;
-
-import lombok.Getter;
-import 
org.apache.shardingsphere.infra.binder.context.statement.CommonSQLStatementContext;
-import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dml.MergeStatement;
-
-/**
- * Merge statement context.
- */
-@Getter
-public final class MergeStatementContext extends CommonSQLStatementContext {
-    
-    public MergeStatementContext(final MergeStatement sqlStatement) {
-        super(sqlStatement);
-    }
-}

Reply via email to