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

sunnianjun 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 45995d1d162 Remove useless KillStatementContext (#32108)
45995d1d162 is described below

commit 45995d1d162b649cef716574f9829cca0457feff
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Jul 15 13:13:58 2024 +0800

    Remove useless KillStatementContext (#32108)
---
 .../statement/SQLStatementContextFactory.java      |  5 ---
 .../statement/dal/KillStatementContext.java        | 36 ----------------------
 2 files changed, 41 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 e13d2d7af44..6c345fab1e4 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
@@ -22,7 +22,6 @@ import lombok.NoArgsConstructor;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dal.AnalyzeTableStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dal.ExplainStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dal.FlushStatementContext;
-import 
org.apache.shardingsphere.infra.binder.context.statement.dal.KillStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dal.OptimizeTableStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dal.ShowColumnsStatementContext;
 import 
org.apache.shardingsphere.infra.binder.context.statement.dal.ShowCreateTableStatementContext;
@@ -68,7 +67,6 @@ import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.Analyze
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.DALStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.ExplainStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.FlushStatement;
-import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.KillStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.OptimizeTableStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.ShowColumnsStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.ShowCreateTableStatement;
@@ -285,9 +283,6 @@ public final class SQLStatementContextFactory {
         if (sqlStatement instanceof OptimizeTableStatement) {
             return new OptimizeTableStatementContext((OptimizeTableStatement) 
sqlStatement, currentDatabaseName);
         }
-        if (sqlStatement instanceof KillStatement) {
-            return new KillStatementContext((KillStatement) sqlStatement);
-        }
         return new UnknownSQLStatementContext(sqlStatement);
     }
 }
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dal/KillStatementContext.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dal/KillStatementContext.java
deleted file mode 100644
index 178d9f87086..00000000000
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dal/KillStatementContext.java
+++ /dev/null
@@ -1,36 +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.dal;
-
-import 
org.apache.shardingsphere.infra.binder.context.statement.CommonSQLStatementContext;
-import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dal.KillStatement;
-
-/**
- * Kill process statement.
- */
-public final class KillStatementContext extends CommonSQLStatementContext {
-    
-    public KillStatementContext(final KillStatement sqlStatement) {
-        super(sqlStatement);
-    }
-    
-    @Override
-    public KillStatement getSqlStatement() {
-        return (KillStatement) super.getSqlStatement();
-    }
-}

Reply via email to