You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by te...@apache.org on 2020/09/19 15:32:11 UTC
[shardingsphere] branch master updated: Simplify
TextProtocolBackendHandlerFactory (#7521)
This is an automated email from the ASF dual-hosted git repository.
technoboy 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 ce03f13 Simplify TextProtocolBackendHandlerFactory (#7521)
ce03f13 is described below
commit ce03f137e3712700e7d301e2261330436208add7
Author: Liang Zhang <te...@163.com>
AuthorDate: Sat Sep 19 23:31:49 2020 +0800
Simplify TextProtocolBackendHandlerFactory (#7521)
* Move SkipBackendHandler
* Create TransactionBackendHandlerFactory
* Create DALBackendHandlerFactory
* Remove ignore with test case
* Move ResponsePacketBuilder to builder package
---
.../text/TextProtocolBackendHandlerFactory.java | 61 ++------------------
.../text/admin/DALBackendHandlerFactory.java | 59 ++++++++++++++++++++
.../{transaction => skip}/SkipBackendHandler.java | 2 +-
.../TransactionBackendHandlerFactory.java | 65 ++++++++++++++++++++++
.../TextProtocolBackendHandlerFactoryTest.java | 5 +-
.../SkipBackendHandlerTest.java | 2 +-
.../execute/MySQLComStmtExecuteExecutor.java | 2 +-
.../{util => builder}/ResponsePacketBuilder.java | 2 +-
.../text/query/MySQLComQueryPacketExecutor.java | 2 +-
9 files changed, 136 insertions(+), 64 deletions(-)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/TextProtocolBackendHandlerFactory.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/TextProtocolBackendHandlerFactory.java
index 5776746..074bfcd 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/TextProtocolBackendHandlerFactory.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/TextProtocolBackendHandlerFactory.java
@@ -22,33 +22,20 @@ import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
-import org.apache.shardingsphere.proxy.backend.text.admin.BroadcastBackendHandler;
+import org.apache.shardingsphere.proxy.backend.text.admin.DALBackendHandlerFactory;
import org.apache.shardingsphere.proxy.backend.text.admin.RDLBackendHandler;
-import org.apache.shardingsphere.proxy.backend.text.admin.ShowDatabasesBackendHandler;
-import org.apache.shardingsphere.proxy.backend.text.admin.ShowTablesBackendHandler;
-import org.apache.shardingsphere.proxy.backend.text.admin.UnicastBackendHandler;
-import org.apache.shardingsphere.proxy.backend.text.admin.UseDatabaseBackendHandler;
import org.apache.shardingsphere.proxy.backend.text.query.QueryBackendHandler;
import org.apache.shardingsphere.proxy.backend.text.sctl.ShardingCTLBackendHandlerFactory;
import org.apache.shardingsphere.proxy.backend.text.sctl.utils.SCTLUtils;
-import org.apache.shardingsphere.proxy.backend.text.transaction.SkipBackendHandler;
-import org.apache.shardingsphere.proxy.backend.text.transaction.TransactionBackendHandler;
+import org.apache.shardingsphere.proxy.backend.text.skip.SkipBackendHandler;
+import org.apache.shardingsphere.proxy.backend.text.transaction.TransactionBackendHandlerFactory;
import org.apache.shardingsphere.rdl.parser.engine.ShardingSphereSQLParserEngineFactory;
import org.apache.shardingsphere.rdl.parser.statement.rdl.RDLStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.dal.DALStatement;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.dal.SetStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateDatabaseStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DropDatabaseStatement;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.BeginTransactionStatement;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.CommitStatement;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.RollbackStatement;
-import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.SetAutoCommitStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.TCLStatement;
-import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowDatabasesStatement;
-import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowTablesStatement;
-import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLUseStatement;
-import org.apache.shardingsphere.transaction.core.TransactionOperationType;
/**
* Text protocol backend handler factory.
@@ -62,7 +49,7 @@ public final class TextProtocolBackendHandlerFactory {
* @param databaseType database type
* @param sql SQL to be executed
* @param backendConnection backend connection
- * @return instance of text protocol backend handler
+ * @return text protocol backend handler
*/
public static TextProtocolBackendHandler newInstance(final DatabaseType databaseType, final String sql, final BackendConnection backendConnection) {
if (Strings.isNullOrEmpty(sql)) {
@@ -78,47 +65,11 @@ public final class TextProtocolBackendHandlerFactory {
return new RDLBackendHandler(backendConnection, sqlStatement);
}
if (sqlStatement instanceof TCLStatement) {
- return createTCLBackendHandler(sql, (TCLStatement) sqlStatement, backendConnection);
+ return TransactionBackendHandlerFactory.newInstance(sql, (TCLStatement) sqlStatement, backendConnection);
}
if (sqlStatement instanceof DALStatement) {
- return createDALBackendHandler(sql, (DALStatement) sqlStatement, backendConnection);
+ return DALBackendHandlerFactory.newInstance(sql, (DALStatement) sqlStatement, backendConnection);
}
return new QueryBackendHandler(sql, sqlStatement, backendConnection);
}
-
- private static TextProtocolBackendHandler createTCLBackendHandler(final String sql, final TCLStatement tclStatement, final BackendConnection backendConnection) {
- if (tclStatement instanceof BeginTransactionStatement) {
- return new TransactionBackendHandler(TransactionOperationType.BEGIN, backendConnection);
- }
- if (tclStatement instanceof SetAutoCommitStatement) {
- if (((SetAutoCommitStatement) tclStatement).isAutoCommit()) {
- return backendConnection.getTransactionStatus().isInTransaction() ? new TransactionBackendHandler(TransactionOperationType.COMMIT, backendConnection) : new SkipBackendHandler();
- }
- return new TransactionBackendHandler(TransactionOperationType.BEGIN, backendConnection);
- }
- if (tclStatement instanceof CommitStatement) {
- return new TransactionBackendHandler(TransactionOperationType.COMMIT, backendConnection);
- }
- if (tclStatement instanceof RollbackStatement) {
- return new TransactionBackendHandler(TransactionOperationType.ROLLBACK, backendConnection);
- }
- return new BroadcastBackendHandler(sql, tclStatement, backendConnection);
- }
-
- private static TextProtocolBackendHandler createDALBackendHandler(final String sql, final DALStatement dalStatement, final BackendConnection backendConnection) {
- if (dalStatement instanceof MySQLUseStatement) {
- return new UseDatabaseBackendHandler((MySQLUseStatement) dalStatement, backendConnection);
- }
- if (dalStatement instanceof MySQLShowDatabasesStatement) {
- return new ShowDatabasesBackendHandler(backendConnection);
- }
- if (dalStatement instanceof MySQLShowTablesStatement) {
- return new ShowTablesBackendHandler(sql, dalStatement, backendConnection);
- }
- // FIXME: There are three SetStatement classes.
- if (dalStatement instanceof SetStatement) {
- return new BroadcastBackendHandler(sql, dalStatement, backendConnection);
- }
- return new UnicastBackendHandler(sql, dalStatement, backendConnection);
- }
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/DALBackendHandlerFactory.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/DALBackendHandlerFactory.java
new file mode 100644
index 0000000..ac87dac
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/DALBackendHandlerFactory.java
@@ -0,0 +1,59 @@
+/*
+ * 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.proxy.backend.text.admin;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
+import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandler;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.dal.DALStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.dal.SetStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowDatabasesStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLShowTablesStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal.MySQLUseStatement;
+
+/**
+ * DAL backend handler factory.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class DALBackendHandlerFactory {
+
+ /**
+ * New instance of backend handler.
+ *
+ * @param sql SQL
+ * @param dalStatement DAL statement
+ * @param backendConnection backend connection
+ * @return backend handler
+ */
+ public static TextProtocolBackendHandler newInstance(final String sql, final DALStatement dalStatement, final BackendConnection backendConnection) {
+ if (dalStatement instanceof MySQLUseStatement) {
+ return new UseDatabaseBackendHandler((MySQLUseStatement) dalStatement, backendConnection);
+ }
+ if (dalStatement instanceof MySQLShowDatabasesStatement) {
+ return new ShowDatabasesBackendHandler(backendConnection);
+ }
+ if (dalStatement instanceof MySQLShowTablesStatement) {
+ return new ShowTablesBackendHandler(sql, dalStatement, backendConnection);
+ }
+ if (dalStatement instanceof SetStatement) {
+ return new BroadcastBackendHandler(sql, dalStatement, backendConnection);
+ }
+ return new UnicastBackendHandler(sql, dalStatement, backendConnection);
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/SkipBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/skip/SkipBackendHandler.java
similarity index 95%
rename from shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/SkipBackendHandler.java
rename to shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/skip/SkipBackendHandler.java
index 801c065..ee3b9b0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/SkipBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/skip/SkipBackendHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.transaction;
+package org.apache.shardingsphere.proxy.backend.text.skip;
import org.apache.shardingsphere.proxy.backend.response.BackendResponse;
import org.apache.shardingsphere.proxy.backend.response.query.QueryData;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandlerFactory.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandlerFactory.java
new file mode 100644
index 0000000..141b5ad
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandlerFactory.java
@@ -0,0 +1,65 @@
+/*
+ * 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.proxy.backend.text.transaction;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
+import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandler;
+import org.apache.shardingsphere.proxy.backend.text.admin.BroadcastBackendHandler;
+import org.apache.shardingsphere.proxy.backend.text.skip.SkipBackendHandler;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.BeginTransactionStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.CommitStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.RollbackStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.SetAutoCommitStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.TCLStatement;
+import org.apache.shardingsphere.transaction.core.TransactionOperationType;
+
+/**
+ * Transaction backend handler factory.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TransactionBackendHandlerFactory {
+
+ /**
+ * New instance of backend handler.
+ *
+ * @param sql SQL
+ * @param tclStatement TCL statement
+ * @param backendConnection backend connection
+ * @return backend handler
+ */
+ public static TextProtocolBackendHandler newInstance(final String sql, final TCLStatement tclStatement, final BackendConnection backendConnection) {
+ if (tclStatement instanceof BeginTransactionStatement) {
+ return new TransactionBackendHandler(TransactionOperationType.BEGIN, backendConnection);
+ }
+ if (tclStatement instanceof SetAutoCommitStatement) {
+ if (((SetAutoCommitStatement) tclStatement).isAutoCommit()) {
+ return backendConnection.getTransactionStatus().isInTransaction() ? new TransactionBackendHandler(TransactionOperationType.COMMIT, backendConnection) : new SkipBackendHandler();
+ }
+ return new TransactionBackendHandler(TransactionOperationType.BEGIN, backendConnection);
+ }
+ if (tclStatement instanceof CommitStatement) {
+ return new TransactionBackendHandler(TransactionOperationType.COMMIT, backendConnection);
+ }
+ if (tclStatement instanceof RollbackStatement) {
+ return new TransactionBackendHandler(TransactionOperationType.ROLLBACK, backendConnection);
+ }
+ return new BroadcastBackendHandler(sql, tclStatement, backendConnection);
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java
index ba8b6c0..dcf935b 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java
@@ -31,13 +31,12 @@ import org.apache.shardingsphere.proxy.backend.text.admin.UseDatabaseBackendHand
import org.apache.shardingsphere.proxy.backend.text.query.QueryBackendHandler;
import org.apache.shardingsphere.proxy.backend.text.sctl.set.ShardingCTLSetBackendHandler;
import org.apache.shardingsphere.proxy.backend.text.sctl.show.ShardingCTLShowBackendHandler;
-import org.apache.shardingsphere.proxy.backend.text.transaction.SkipBackendHandler;
+import org.apache.shardingsphere.proxy.backend.text.skip.SkipBackendHandler;
import org.apache.shardingsphere.proxy.backend.text.transaction.TransactionBackendHandler;
import org.apache.shardingsphere.transaction.ShardingTransactionManagerEngine;
import org.apache.shardingsphere.transaction.context.TransactionContexts;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Answers;
@@ -161,11 +160,9 @@ public final class TextProtocolBackendHandlerFactoryTest {
}
@Test
- @Ignore("There are three SetStatement class")
public void assertNewInstanceWithSet() {
String sql = "set @num=1";
TextProtocolBackendHandler actual = TextProtocolBackendHandlerFactory.newInstance(databaseType, sql, backendConnection);
- // FIXME: There are three SetStatement class.
assertThat(actual, instanceOf(BroadcastBackendHandler.class));
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/transaction/SkipBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/skip/SkipBackendHandlerTest.java
similarity index 95%
rename from shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/transaction/SkipBackendHandlerTest.java
rename to shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/skip/SkipBackendHandlerTest.java
index 45842bf..d7805fa 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/transaction/SkipBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/skip/SkipBackendHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.transaction;
+package org.apache.shardingsphere.proxy.backend.text.skip;
import org.apache.shardingsphere.proxy.backend.response.BackendResponse;
import org.apache.shardingsphere.proxy.backend.response.update.UpdateResponse;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
index 77493cf..0ab9c99 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
@@ -34,7 +34,7 @@ import org.apache.shardingsphere.proxy.backend.response.query.QueryResponse;
import org.apache.shardingsphere.proxy.backend.response.update.UpdateResponse;
import org.apache.shardingsphere.proxy.frontend.command.executor.QueryCommandExecutor;
import org.apache.shardingsphere.proxy.frontend.command.executor.ResponseType;
-import org.apache.shardingsphere.proxy.frontend.mysql.command.query.util.ResponsePacketBuilder;
+import org.apache.shardingsphere.proxy.frontend.mysql.command.query.builder.ResponsePacketBuilder;
import org.apache.shardingsphere.rdl.parser.engine.ShardingSphereSQLParserEngine;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/util/ResponsePacketBuilder.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/builder/ResponsePacketBuilder.java
similarity index 99%
rename from shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/util/ResponsePacketBuilder.java
rename to shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/builder/ResponsePacketBuilder.java
index 86b29da..2e30042 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/util/ResponsePacketBuilder.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/builder/ResponsePacketBuilder.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.frontend.mysql.command.query.util;
+package org.apache.shardingsphere.proxy.frontend.mysql.command.query.builder;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
index 2fe215a..db21998 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
@@ -33,7 +33,7 @@ import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandler;
import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandlerFactory;
import org.apache.shardingsphere.proxy.frontend.command.executor.QueryCommandExecutor;
import org.apache.shardingsphere.proxy.frontend.command.executor.ResponseType;
-import org.apache.shardingsphere.proxy.frontend.mysql.command.query.util.ResponsePacketBuilder;
+import org.apache.shardingsphere.proxy.frontend.mysql.command.query.builder.ResponsePacketBuilder;
import java.sql.SQLException;
import java.util.Collection;