You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/05/22 03:16:11 UTC

(shardingsphere) branch master updated: Refactor sql federation compiler module structure (#35481)

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

zhaojinchao 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 ed98a624041 Refactor sql federation compiler module structure (#35481)
ed98a624041 is described below

commit ed98a6240410dc800c5cfa8ba98f2fcc977ee7aa
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Thu May 22 11:16:04 2025 +0800

    Refactor sql federation compiler module structure (#35481)
---
 .../reflect-config.json                            | 52 +++++++++++-----------
 .../resource-config.json                           |  6 +--
 .../reflect-config.json                            | 12 ++---
 .../single/decider/SingleSQLFederationDecider.java |  5 +--
 .../sql-federation/{optimizer => compiler}/pom.xml |  2 +-
 .../compiler}/SQLFederationCompilerEngine.java     |  8 ++--
 .../compiler}/SQLFederationExecutionPlan.java      |  2 +-
 .../compiler/compiler}/SQLStatementCompiler.java   | 10 ++---
 .../compiler}/SQLStatementCompilerEngine.java      |  8 ++--
 .../SQLStatementCompilerEngineFactory.java         |  2 +-
 .../compiler/context/CompilerContext.java}         |  6 +--
 .../compiler/context/CompilerContextFactory.java}  | 18 ++++----
 .../connection/config/ConnectionConfigBuilder.java |  2 +-
 .../config/ConnectionConfigBuilderFactory.java     |  2 +-
 .../config/impl/H2ConnectionConfigBuilder.java     |  4 +-
 .../config/impl/MySQLConnectionConfigBuilder.java  |  4 +-
 .../impl/OpenGaussConnectionConfigBuilder.java     |  4 +-
 .../config/impl/OracleConnectionConfigBuilder.java |  4 +-
 .../impl/PostgreSQLConnectionConfigBuilder.java    |  4 +-
 .../config/impl/SQL92ConnectionConfigBuilder.java  |  4 +-
 .../impl/SQLServerConnectionConfigBuilder.java     |  4 +-
 .../context/schema/CalciteSchemaBuilder.java       | 10 ++---
 .../exception/SQLFederationSQLException.java       |  2 +-
 .../SQLFederationSQLNodeConvertException.java}     |  8 ++--
 .../SQLFederationSchemaNotFoundException.java      |  2 +-
 .../SQLFederationUnsupportedSQLException.java      |  2 +-
 .../catalog/SQLFederationCatalogReader.java        |  2 +-
 .../datatype/SQLFederationDataTypeBuilder.java     |  2 +-
 .../datatype/SQLFederationDataTypeFactory.java     |  2 +-
 .../metadata/schema/SQLFederationDatabase.java     |  2 +-
 .../metadata/schema/SQLFederationSchema.java       |  4 +-
 .../metadata/schema/SQLFederationTable.java        | 10 ++---
 .../metadata/schema/table/EmptyRowEnumerator.java  |  2 +-
 .../metadata/schema/table/ScanExecutor.java        |  2 +-
 .../metadata/schema/table/ScanExecutorContext.java |  2 +-
 .../metadata/util/SQLFederationValidatorUtils.java | 12 ++---
 .../metadata/view/ShardingSphereViewExpander.java  |  4 +-
 .../builder/SQLFederationPlannerBuilder.java       | 10 ++---
 .../planner/cache/ExecutionPlanCacheBuilder.java   |  4 +-
 .../planner/cache/ExecutionPlanCacheKey.java       |  4 +-
 .../planner/cache/ExecutionPlanCacheLoader.java    |  4 +-
 .../converter/EnumerableModifyConverterRule.java   |  4 +-
 .../converter/EnumerableScanConverterRule.java     |  6 +--
 .../transformation/PushFilterIntoScanRule.java     |  4 +-
 .../transformation/PushProjectIntoScanRule.java    |  4 +-
 .../sql/ast}/converter/SQLNodeConverterEngine.java | 20 ++++-----
 .../operator/common/SQLExtensionOperatorTable.java |  4 +-
 .../dialect/mysql/MySQLMatchAgainstOperator.java   |  2 +-
 .../segment/expression/ExpressionConverter.java    | 46 +++++++++----------
 .../impl/BetweenExpressionConverter.java           |  4 +-
 .../impl/BinaryOperationExpressionConverter.java   |  6 +--
 .../impl/CaseWhenExpressionConverter.java          |  4 +-
 .../impl/CollateExpressionConverter.java           |  6 +--
 .../segment/expression/impl/ColumnConverter.java   |  2 +-
 .../impl/ExistsSubqueryExpressionConverter.java    |  4 +-
 .../impl/ExtractArgExpressionConverter.java        |  2 +-
 .../segment/expression/impl/FunctionConverter.java |  6 +--
 .../expression/impl/InExpressionConverter.java     |  4 +-
 .../impl/IntervalExpressionConverter.java          |  6 +--
 .../expression/impl/ListExpressionConverter.java   |  4 +-
 .../impl/LiteralExpressionConverter.java           |  2 +-
 .../expression/impl/MatchExpressionConverter.java  |  6 +--
 .../expression/impl/NotExpressionConverter.java    |  6 +--
 .../impl/ParameterMarkerExpressionConverter.java   |  2 +-
 .../expression/impl/RowExpressionConverter.java    |  4 +-
 .../impl/SubqueryExpressionConverter.java          |  4 +-
 .../expression/impl/TrimFunctionConverter.java     |  4 +-
 .../impl/TypeCastExpressionConverter.java          |  6 +--
 .../impl/UnaryOperationExpressionConverter.java    |  6 +--
 .../expression/impl/VariableSegmentConverter.java  |  2 +-
 .../expression/impl/WindowFunctionConverter.java   |  4 +-
 .../converter/segment/from/TableConverter.java     | 10 ++---
 .../from/impl/DeleteMultiTableConverter.java       |  4 +-
 .../segment/from/impl/JoinTableConverter.java      |  8 ++--
 .../segment/from/impl/SimpleTableConverter.java    |  4 +-
 .../segment/from/impl/SubqueryTableConverter.java  |  6 +--
 .../converter/segment/generic/OwnerConverter.java  |  2 +-
 .../segment/groupby/GroupByConverter.java          |  4 +-
 .../converter/segment/groupby/HavingConverter.java |  4 +-
 .../segment/limit/PaginationValueSQLConverter.java |  2 +-
 .../segment/orderby/OrderByConverter.java          |  4 +-
 .../orderby/item/ColumnOrderByItemConverter.java   |  4 +-
 .../item/ExpressionOrderByItemConverter.java       |  4 +-
 .../orderby/item/IndexOrderByItemConverter.java    |  2 +-
 .../orderby/item/OrderByItemConverterUtils.java    |  2 +-
 .../segment/projection/DistinctConverter.java      |  2 +-
 .../segment/projection/ProjectionsConverter.java   | 14 +++---
 .../impl/AggregationProjectionConverter.java       |  4 +-
 .../projection/impl/ColumnProjectionConverter.java |  4 +-
 .../segment/projection/impl/DataTypeConverter.java |  2 +-
 .../impl/ExpressionProjectionConverter.java        |  4 +-
 .../impl/ShorthandProjectionConverter.java         |  2 +-
 .../impl/SubqueryProjectionConverter.java          |  4 +-
 .../converter/segment/where/WhereConverter.java    |  4 +-
 .../converter/segment/window/WindowConverter.java  |  4 +-
 .../ast}/converter/segment/with/WithConverter.java |  6 +--
 .../converter/statement/SQLStatementConverter.java |  2 +-
 .../statement/delete/DeleteStatementConverter.java | 14 +++---
 .../explain/ExplainStatementConverter.java         | 12 ++---
 .../statement/insert/InsertStatementConverter.java | 12 ++---
 .../statement/merge/MergeStatementConverter.java   | 12 ++---
 .../statement/select/SelectStatementConverter.java | 26 +++++------
 .../statement/update/UpdateStatementConverter.java | 16 +++----
 .../converter/type/CombineOperatorConverter.java   |  2 +-
 .../sql/ast}/converter/type/DataTypeConverter.java |  2 +-
 .../compiler/sql/dialect}/SQLDialectFactory.java   |  6 +--
 .../sql/dialect/impl}/CustomMySQLSQLDialect.java   |  2 +-
 .../dialect/impl}/CustomPostgreSQLSQLDialect.java  |  2 +-
 .../function/SQLFederationFunctionRegister.java    |  2 +-
 .../sql}/function/mysql/MySQLFunctionRegister.java |  6 +--
 .../sql}/function/mysql/MySQLOperatorTable.java    |  6 +--
 .../sql}/function/mysql/impl/MySQLBinFunction.java |  2 +-
 .../function/mysql/impl/MySQLBitCountFunction.java |  2 +-
 .../sql}/function/mysql/impl/MySQLNotFunction.java |  2 +-
 .../opengauss/OpenGaussFunctionRegister.java       |  8 ++--
 .../opengauss/impl/OpenGaussSystemFunction.java    |  2 +-
 .../postgresql/PostgreSQLFunctionRegister.java     |  6 +--
 .../postgresql/impl/PostgreSQLSystemFunction.java  |  2 +-
 .../sql}/operator/logical/LogicalScan.java         |  4 +-
 .../sql}/operator/physical/EnumerableModify.java   |  2 +-
 .../sql}/operator/physical/EnumerableScan.java     |  6 +--
 .../util/LogicalScanPushDownRelBuilder.java        |  2 +-
 .../sql}/operator/util/LogicalScanRelShuttle.java  |  4 +-
 ...text.connection.config.ConnectionConfigBuilder} | 14 +++---
 ...ler.sql.function.SQLFederationFunctionRegister} |  6 +--
 .../src/main/resources/saffron.properties          |  0
 .../compiler}/it/SQLStatementCompilerIT.java       | 12 ++---
 .../compiler/compiler}/it/TestCase.java            |  2 +-
 .../compiler/compiler}/it/TestCaseAssertion.java   |  2 +-
 .../compiler/compiler}/it/TestCases.java           |  2 +-
 .../compiler/compiler}/it/TestCasesLoader.java     |  2 +-
 .../compiler/context/CompilerContextTest.java}     | 14 +++---
 .../type/CombineOperatorConverterTest.java         |  2 +-
 .../cases/federation-delete-sql-cases.xml          |  0
 .../resources/cases/federation-query-sql-cases.xml |  0
 .../src/test/resources/logback-test.xml            |  0
 .../sqlfederation/engine/SQLFederationEngine.java  | 31 ++++++-------
 .../engine/processor/SQLFederationProcessor.java   |  8 ++--
 .../impl/StandardSQLFederationProcessor.java       | 12 ++---
 .../resultset/SQLFederationResultSetMetaData.java  |  2 +-
 .../sqlfederation/rule/SQLFederationRule.java      | 18 ++++----
 .../resultset/SQLFederationResultSetTest.java      |  2 +-
 kernel/sql-federation/executor/pom.xml             |  2 +-
 .../enumerable/EnumerableScanExecutor.java         | 12 ++---
 .../executor/utils/EnumeratorUtils.java            |  2 +-
 .../enumerable/EnumerableScanExecutorTest.java     |  8 ++--
 kernel/sql-federation/pom.xml                      |  2 +-
 .../converter/SQLNodeConverterEngineIT.java        | 10 ++---
 .../SQLNodeConverterTestCaseLoaderCallback.java    |  6 +--
 .../converter/cases/SQLNodeConverterTestCases.java |  4 +-
 .../cases/SQLNodeConverterTestCasesRegistry.java   |  2 +-
 .../cases/jaxb/RootSQLNodeConverterTestCases.java  |  2 +-
 .../cases/jaxb/SQLNodeConverterTestCase.java       |  2 +-
 153 files changed, 446 insertions(+), 446 deletions(-)

diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
index 30db81f547e..abed562fc4a 100644
--- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
+++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
@@ -3781,56 +3781,56 @@
   "name":"org.apache.shardingsphere.sqlfederation.distsql.parser.facade.SQLFederationDistSQLParserFacade"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.H2ConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.H2ConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.MySQLConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.MySQLConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.OpenGaussConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.OpenGaussConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.OracleConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.OracleConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.PostgreSQLConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.PostgreSQLConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.SQL92ConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.SQL92ConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.SQLServerConnectionConfigBuilder"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.SQLServerConnectionConfigBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.schema.CalciteSchemaBuilder"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLBinFunction"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.schema.CalciteSchemaBuilder"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.function.mysql.impl.MySQLBinFunction"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.schema.CalciteSchemaBuilder$$Lambda/0x0000027d0c57d148"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLBinFunction"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.schema.CalciteSchemaBuilder$$Lambda/0x0000027d0c57d148"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.function.mysql.impl.MySQLBinFunction"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.MySQLFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLBinFunction"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.MySQLFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLBinFunction"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.OpenGaussFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.impl.OpenGaussSystemFunction"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.OpenGaussFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.impl.OpenGaussSystemFunction"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.OpenGaussFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.impl.PostgreSQLSystemFunction"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.OpenGaussFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.impl.PostgreSQLSystemFunction"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.PostgreSQLFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.impl.PostgreSQLSystemFunction"
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.PostgreSQLFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.impl.PostgreSQLSystemFunction"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"},
diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
index 8fa5a0d0f6d..fe00288cd2c 100644
--- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
+++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
@@ -310,8 +310,8 @@
     "condition":{"typeReachable":"org.apache.shardingsphere.readwritesplitting.route.standard.StandardReadwriteSplittingDataSourceRouter"},
     "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.readwritesplitting.route.standard.filter.ReadDataSourcesFilter\\E"
   }, {
-    "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
-    "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder\\E"
+    "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
+    "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder\\E"
   }, {
     "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.engine.SQLFederationEngine"},
     "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.sqlfederation.spi.SQLFederationDecider\\E"
@@ -412,7 +412,7 @@
     "condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
     "pattern":"\\Qregistry.conf\\E"
   }, {
-    "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory"},
+    "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"},
     "pattern":"\\Qsaffron.properties\\E"
   }, {
     "condition":{"typeReachable":"org.apache.shardingsphere.infra.metadata.database.schema.manager.SystemSchemaManager"},
diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
index 92ea88c5ac7..f8ba5f97e98 100644
--- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
+++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
@@ -428,18 +428,18 @@
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.MySQLFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLBinFunction",
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.function.mysql.MySQLFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.function.mysql.impl.MySQLBinFunction",
   "allPublicMethods": true
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.PostgreSQLFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.impl.PostgreSQLSystemFunction",
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.function.postgresql.PostgreSQLFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.function.postgresql.impl.PostgreSQLSystemFunction",
   "allPublicMethods": true
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.OpenGaussFunctionRegister"},
-  "name":"org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.impl.OpenGaussSystemFunction",
+  "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.function.opengauss.OpenGaussFunctionRegister"},
+  "name":"org.apache.shardingsphere.sqlfederation.compiler.function.opengauss.impl.OpenGaussSystemFunction",
   "allPublicMethods": true
 },
 {
diff --git a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDecider.java b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDecider.java
index 0774663b860..0dfab6db1cd 100644
--- a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDecider.java
+++ b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDecider.java
@@ -77,9 +77,8 @@ public final class SingleSQLFederationDecider implements SQLFederationDecider<Si
         if (!selectStatement.getFrom().isPresent() || !(selectStatement.getFrom().get() instanceof JoinTableSegment)) {
             return true;
         }
-        return selectStatement.getFrom().isPresent() && selectStatement.getFrom().get() instanceof JoinTableSegment
-                && (JoinType.INNER.name().equalsIgnoreCase(((JoinTableSegment) selectStatement.getFrom().get()).getJoinType())
-                        || JoinType.COMMA.name().equalsIgnoreCase(((JoinTableSegment) selectStatement.getFrom().get()).getJoinType()));
+        JoinTableSegment joinTableSegment = (JoinTableSegment) selectStatement.getFrom().get();
+        return JoinType.INNER.name().equalsIgnoreCase(joinTableSegment.getJoinType()) || JoinType.COMMA.name().equalsIgnoreCase(joinTableSegment.getJoinType());
     }
     
     private Collection<QualifiedTable> getSingleTables(final SelectStatementContext selectStatementContext, final ShardingSphereDatabase database, final SingleRule rule) {
diff --git a/kernel/sql-federation/optimizer/pom.xml b/kernel/sql-federation/compiler/pom.xml
similarity index 98%
rename from kernel/sql-federation/optimizer/pom.xml
rename to kernel/sql-federation/compiler/pom.xml
index c85587ddcba..6a68c9d3216 100644
--- a/kernel/sql-federation/optimizer/pom.xml
+++ b/kernel/sql-federation/compiler/pom.xml
@@ -23,7 +23,7 @@
         <artifactId>shardingsphere-sql-federation</artifactId>
         <version>5.5.3-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-sql-federation-optimizer</artifactId>
+    <artifactId>shardingsphere-sql-federation-compiler</artifactId>
     <name>${project.artifactId}</name>
     
     <properties>
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/SQLFederationCompilerEngine.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/SQLFederationCompilerEngine.java
similarity index 83%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/SQLFederationCompilerEngine.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/SQLFederationCompilerEngine.java
index f0cdc1bbde6..64b79ab5ab2 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/SQLFederationCompilerEngine.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/SQLFederationCompilerEngine.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer;
+package org.apache.shardingsphere.sqlfederation.compiler;
 
 import org.apache.shardingsphere.sqlfederation.config.SQLFederationCacheOption;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.cache.ExecutionPlanCacheKey;
-import org.apache.shardingsphere.sqlfederation.optimizer.statement.SQLStatementCompilerEngine;
-import org.apache.shardingsphere.sqlfederation.optimizer.statement.SQLStatementCompilerEngineFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.compiler.SQLStatementCompilerEngine;
+import org.apache.shardingsphere.sqlfederation.compiler.compiler.SQLStatementCompilerEngineFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.cache.ExecutionPlanCacheKey;
 
 /**
  * SQL federation compiler engine.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/SQLFederationExecutionPlan.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/SQLFederationExecutionPlan.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/SQLFederationExecutionPlan.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/SQLFederationExecutionPlan.java
index 6b9726a026e..28471d83390 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/SQLFederationExecutionPlan.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/SQLFederationExecutionPlan.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer;
+package org.apache.shardingsphere.sqlfederation.compiler;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompiler.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompiler.java
similarity index 88%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompiler.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompiler.java
index 2b2e1f3bc5e..e30f4b2d6ba 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompiler.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompiler.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.statement;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler;
 
 import lombok.RequiredArgsConstructor;
 import org.apache.calcite.plan.Convention;
@@ -27,10 +27,10 @@ import org.apache.calcite.rel.type.RelDataType;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql2rel.SqlToRelConverter;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.SQLNodeConverterEngine;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.util.LogicalScanRelShuttle;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.builder.SQLFederationPlannerBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.builder.SQLFederationPlannerBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.SQLNodeConverterEngine;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.util.LogicalScanRelShuttle;
 
 import java.util.Objects;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompilerEngine.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompilerEngine.java
similarity index 83%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompilerEngine.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompilerEngine.java
index 6a3eb659a2a..f751b809b76 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompilerEngine.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompilerEngine.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.statement;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler;
 
 import com.github.benmanes.caffeine.cache.LoadingCache;
 import org.apache.shardingsphere.sqlfederation.config.SQLFederationCacheOption;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.cache.ExecutionPlanCacheBuilder;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.cache.ExecutionPlanCacheKey;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.cache.ExecutionPlanCacheBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.cache.ExecutionPlanCacheKey;
 
 /**
  * SQL statement compiler engine.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompilerEngineFactory.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompilerEngineFactory.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompilerEngineFactory.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompilerEngineFactory.java
index 8580d2d18a5..d920690d8be 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/statement/SQLStatementCompilerEngineFactory.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/SQLStatementCompilerEngineFactory.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.statement;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContext.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContext.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContext.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContext.java
index 8ec7bc7d996..03c14a17490 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContext.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContext.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context;
+package org.apache.shardingsphere.sqlfederation.compiler.context;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
@@ -24,11 +24,11 @@ import org.apache.calcite.jdbc.CalciteSchema;
 import org.apache.shardingsphere.parser.rule.SQLParserRule;
 
 /**
- * Optimizer context.
+ * Compiler context.
  */
 @RequiredArgsConstructor
 @Getter
-public final class OptimizerContext {
+public final class CompilerContext {
     
     private final SQLParserRule sqlParserRule;
     
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContextFactory.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContextFactory.java
similarity index 80%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContextFactory.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContextFactory.java
index 2e6a980f5e9..f635a6a1590 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContextFactory.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContextFactory.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context;
+package org.apache.shardingsphere.sqlfederation.compiler.context;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -28,30 +28,30 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.parser.rule.SQLParserRule;
 import org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder;
 import org.apache.shardingsphere.parser.rule.builder.SQLParserRuleBuilder;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilderFactory;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.schema.CalciteSchemaBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.context.schema.CalciteSchemaBuilder;
 
 import java.util.Collection;
 import java.util.Properties;
 
 /**
- * Optimizer context factory.
+ * Compiler context factory.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class OptimizerContextFactory {
+public final class CompilerContextFactory {
     
     /**
-     * Create optimize context.
+     * Create compiler context.
      *
      * @param databases databases
-     * @return created optimizer context
+     * @return created compiler context
      */
-    public static OptimizerContext create(final Collection<ShardingSphereDatabase> databases) {
+    public static CompilerContext create(final Collection<ShardingSphereDatabase> databases) {
         // TODO consider to use sqlParserRule in global rule
         SQLParserRule sqlParserRule = new SQLParserRuleBuilder().build(new DefaultSQLParserRuleConfigurationBuilder().build(), databases, new ConfigurationProperties(new Properties()));
         CalciteConnectionConfig connectionConfig = buildConnectionConfig(databases);
         CalciteSchema calciteSchema = CalciteSchemaBuilder.build(databases);
-        return new OptimizerContext(sqlParserRule, calciteSchema, connectionConfig);
+        return new CompilerContext(sqlParserRule, calciteSchema, connectionConfig);
     }
     
     private static CalciteConnectionConfig buildConnectionConfig(final Collection<ShardingSphereDatabase> databases) {
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/ConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/ConnectionConfigBuilder.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/ConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/ConnectionConfigBuilder.java
index 327b532ab4d..4ed1549c86d 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/ConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/ConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPI;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/ConnectionConfigBuilderFactory.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/ConnectionConfigBuilderFactory.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/ConnectionConfigBuilderFactory.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/ConnectionConfigBuilderFactory.java
index 960bd8b07a5..c84ac10e62d 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/ConnectionConfigBuilderFactory.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/ConnectionConfigBuilderFactory.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/H2ConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/H2ConnectionConfigBuilder.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/H2ConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/H2ConnectionConfigBuilder.java
index 750468779b5..fa936906466 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/H2ConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/H2ConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/MySQLConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/MySQLConnectionConfigBuilder.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/MySQLConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/MySQLConnectionConfigBuilder.java
index 51a18738018..de8cd7552b4 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/MySQLConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/MySQLConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/OpenGaussConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/OpenGaussConnectionConfigBuilder.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/OpenGaussConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/OpenGaussConnectionConfigBuilder.java
index 7f85584d3d8..b5a264fd5c4 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/OpenGaussConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/OpenGaussConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/OracleConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/OracleConnectionConfigBuilder.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/OracleConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/OracleConnectionConfigBuilder.java
index 1b75aab2969..3b3a81ffe36 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/OracleConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/OracleConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/PostgreSQLConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/PostgreSQLConnectionConfigBuilder.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/PostgreSQLConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/PostgreSQLConnectionConfigBuilder.java
index e57fae5e71d..b12615e1c76 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/PostgreSQLConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/PostgreSQLConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/SQL92ConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/SQL92ConnectionConfigBuilder.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/SQL92ConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/SQL92ConnectionConfigBuilder.java
index 6172e47f2ed..54b37132b55 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/SQL92ConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/SQL92ConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/SQLServerConnectionConfigBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/SQLServerConnectionConfigBuilder.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/SQLServerConnectionConfigBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/SQLServerConnectionConfigBuilder.java
index 9ab2e5f3b7d..ade9e2c21c5 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/connection/config/impl/SQLServerConnectionConfigBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/connection/config/impl/SQLServerConnectionConfigBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.config.CalciteConnectionConfigImpl;
@@ -23,7 +23,7 @@ import org.apache.calcite.config.CalciteConnectionProperty;
 import org.apache.calcite.config.Lex;
 import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.validate.SqlConformanceEnum;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder;
 
 import java.util.Properties;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/schema/CalciteSchemaBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/schema/CalciteSchemaBuilder.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/schema/CalciteSchemaBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/schema/CalciteSchemaBuilder.java
index 3a259ccb487..129a8f10a4f 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/context/schema/CalciteSchemaBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/context/schema/CalciteSchemaBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context.schema;
+package org.apache.shardingsphere.sqlfederation.compiler.context.schema;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -29,10 +29,10 @@ import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeRegistry;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeFactory;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.SQLFederationDatabase;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.SQLFederationSchema;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationDatabase;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationSchema;
 
 import java.util.Collection;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationSQLException.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSQLException.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationSQLException.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSQLException.java
index c00c7a06a98..d13cc5aa15c 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationSQLException.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSQLException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.exception;
+package org.apache.shardingsphere.sqlfederation.compiler.exception;
 
 import org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.SQLState;
 import org.apache.shardingsphere.infra.exception.core.external.sql.type.feature.FeatureSQLException;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/OptimizationSQLNodeConvertException.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSQLNodeConvertException.java
similarity index 80%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/OptimizationSQLNodeConvertException.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSQLNodeConvertException.java
index 575d8828fb8..eac9d2feb11 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/OptimizationSQLNodeConvertException.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSQLNodeConvertException.java
@@ -15,19 +15,19 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.exception;
+package org.apache.shardingsphere.sqlfederation.compiler.exception;
 
 import org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
 
 /**
- * Optimization SQL node convert exception.
+ * SQL federation SQL node convert exception.
  */
-public final class OptimizationSQLNodeConvertException extends SQLFederationSQLException {
+public final class SQLFederationSQLNodeConvertException extends SQLFederationSQLException {
     
     private static final long serialVersionUID = 7115939407266382363L;
     
-    public OptimizationSQLNodeConvertException(final SQLStatement statement) {
+    public SQLFederationSQLNodeConvertException(final SQLStatement statement) {
         super(XOpenSQLState.SYNTAX_ERROR, 0, "Unsupported SQL node conversion for SQL statement '%s'.", statement);
     }
 }
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationSchemaNotFoundException.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSchemaNotFoundException.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationSchemaNotFoundException.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSchemaNotFoundException.java
index f23ba5e4a19..cf0e34a1359 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationSchemaNotFoundException.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationSchemaNotFoundException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.exception;
+package org.apache.shardingsphere.sqlfederation.compiler.exception;
 
 import org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationUnsupportedSQLException.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationUnsupportedSQLException.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationUnsupportedSQLException.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationUnsupportedSQLException.java
index 25a925cdf8a..f8712456af3 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/exception/SQLFederationUnsupportedSQLException.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/exception/SQLFederationUnsupportedSQLException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.exception;
+package org.apache.shardingsphere.sqlfederation.compiler.exception;
 
 import org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/catalog/SQLFederationCatalogReader.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/catalog/SQLFederationCatalogReader.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/catalog/SQLFederationCatalogReader.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/catalog/SQLFederationCatalogReader.java
index 6baeec107cf..6818651f222 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/catalog/SQLFederationCatalogReader.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/catalog/SQLFederationCatalogReader.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.catalog;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.catalog;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.jdbc.CalciteSchema;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/datatype/SQLFederationDataTypeBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/datatype/SQLFederationDataTypeBuilder.java
similarity index 97%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/datatype/SQLFederationDataTypeBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/datatype/SQLFederationDataTypeBuilder.java
index ca940870134..24f0e4cfc0f 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/datatype/SQLFederationDataTypeBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/datatype/SQLFederationDataTypeBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/datatype/SQLFederationDataTypeFactory.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/datatype/SQLFederationDataTypeFactory.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/datatype/SQLFederationDataTypeFactory.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/datatype/SQLFederationDataTypeFactory.java
index af1b20615fc..04099aa7db5 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/datatype/SQLFederationDataTypeFactory.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/datatype/SQLFederationDataTypeFactory.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationDatabase.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabase.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationDatabase.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabase.java
index 0ea31dd5195..5986e99e43e 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationDatabase.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabase.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.schema;
 
 import com.cedarsoftware.util.CaseInsensitiveMap;
 import lombok.Getter;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationSchema.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchema.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationSchema.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchema.java
index f5106f8c0c6..48e4cb68199 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationSchema.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchema.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.schema;
 
 import com.cedarsoftware.util.CaseInsensitiveMap;
 import lombok.Getter;
@@ -29,7 +29,7 @@ import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereView;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeBuilder;
 
 import java.util.Collections;
 import java.util.Map;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationTable.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationTable.java
index 2bb3d91c67d..3a990e7f7e6 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationTable.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.schema;
 
 import com.alibaba.ttl.TransmittableThreadLocal;
 import lombok.RequiredArgsConstructor;
@@ -46,10 +46,10 @@ import org.apache.calcite.schema.impl.AbstractTable;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.EmptyRowEnumerator;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.ScanExecutor;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.ScanExecutorContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.EmptyRowEnumerator;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.ScanExecutor;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.ScanExecutorContext;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeBuilder;
 
 import java.lang.reflect.Type;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/EmptyRowEnumerator.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/EmptyRowEnumerator.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/EmptyRowEnumerator.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/EmptyRowEnumerator.java
index 2c8699de2bb..e4c6b65ff6e 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/EmptyRowEnumerator.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/EmptyRowEnumerator.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table;
 
 import org.apache.calcite.linq4j.Enumerator;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/ScanExecutor.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/ScanExecutor.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/ScanExecutor.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/ScanExecutor.java
index 2bbb4c6156d..3fe845b6871 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/ScanExecutor.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/ScanExecutor.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table;
 
 import org.apache.calcite.linq4j.Enumerable;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/ScanExecutorContext.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/ScanExecutorContext.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/ScanExecutorContext.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/ScanExecutorContext.java
index cc87bdf1c38..f3f9e44b2ac 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/table/ScanExecutorContext.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/table/ScanExecutorContext.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/util/SQLFederationValidatorUtils.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationValidatorUtils.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/util/SQLFederationValidatorUtils.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationValidatorUtils.java
index 0e9767fd7c7..742b998c3ed 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/util/SQLFederationValidatorUtils.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationValidatorUtils.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.util;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.util;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -41,11 +41,11 @@ import org.apache.calcite.sql2rel.StandardConvertletTable;
 import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPILoader;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.parser.rule.SQLParserRule;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.MySQLOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.catalog.SQLFederationCatalogReader;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.view.ShardingSphereViewExpander;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.builder.SQLFederationPlannerBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.MySQLOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.catalog.SQLFederationCatalogReader;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.view.ShardingSphereViewExpander;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.builder.SQLFederationPlannerBuilder;
 
 import java.util.Arrays;
 import java.util.Collections;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/view/ShardingSphereViewExpander.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/view/ShardingSphereViewExpander.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/view/ShardingSphereViewExpander.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/view/ShardingSphereViewExpander.java
index fe255c0c0e3..bd8facec0b6 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/view/ShardingSphereViewExpander.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/view/ShardingSphereViewExpander.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.metadata.view;
+package org.apache.shardingsphere.sqlfederation.compiler.metadata.view;
 
 import lombok.RequiredArgsConstructor;
 import org.apache.calcite.plan.RelOptTable.ViewExpander;
@@ -26,7 +26,7 @@ import org.apache.calcite.sql2rel.SqlToRelConverter;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.parser.rule.SQLParserRule;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.SQLNodeConverterEngine;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.SQLNodeConverterEngine;
 import org.checkerframework.checker.nullness.qual.Nullable;
 
 import java.util.List;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/builder/SQLFederationPlannerBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/builder/SQLFederationPlannerBuilder.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/builder/SQLFederationPlannerBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/builder/SQLFederationPlannerBuilder.java
index dc67dada986..43e8e546dab 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/builder/SQLFederationPlannerBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/builder/SQLFederationPlannerBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.builder;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.builder;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -33,10 +33,10 @@ import org.apache.calcite.rel.RelCollationTraitDef;
 import org.apache.calcite.rel.rules.AggregateExpandDistinctAggregatesRule;
 import org.apache.calcite.rel.rules.CoreRules;
 import org.apache.calcite.rel.rules.ProjectRemoveRule;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.converter.EnumerableModifyConverterRule;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.converter.EnumerableScanConverterRule;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.transformation.PushFilterIntoScanRule;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.transformation.PushProjectIntoScanRule;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.rule.converter.EnumerableModifyConverterRule;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.rule.converter.EnumerableScanConverterRule;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.rule.transformation.PushFilterIntoScanRule;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.rule.transformation.PushProjectIntoScanRule;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheBuilder.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheBuilder.java
index 597a1681950..631f3fb1f94 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheBuilder.java
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.cache;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.cache;
 
 import com.github.benmanes.caffeine.cache.Caffeine;
 import com.github.benmanes.caffeine.cache.LoadingCache;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.shardingsphere.sqlfederation.config.SQLFederationCacheOption;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
 
 /**
  * Execution plan cache builder.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheKey.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheKey.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheKey.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheKey.java
index 14b93f6c631..92447469886 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheKey.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheKey.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.cache;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.cache;
 
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.statement.SQLStatementCompiler;
+import org.apache.shardingsphere.sqlfederation.compiler.compiler.SQLStatementCompiler;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheLoader.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheLoader.java
similarity index 89%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheLoader.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheLoader.java
index 130e5e806db..8944278c355 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/cache/ExecutionPlanCacheLoader.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/cache/ExecutionPlanCacheLoader.java
@@ -15,10 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.cache;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.cache;
 
 import com.github.benmanes.caffeine.cache.CacheLoader;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
 
 import javax.annotation.ParametersAreNonnullByDefault;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/converter/EnumerableModifyConverterRule.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/converter/EnumerableModifyConverterRule.java
index b12378e97c2..74b4e80434b 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/converter/EnumerableModifyConverterRule.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.converter;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.rule.converter;
 
 import org.apache.calcite.adapter.enumerable.EnumerableConvention;
 import org.apache.calcite.plan.Convention;
@@ -25,7 +25,7 @@ import org.apache.calcite.rel.convert.ConverterRule;
 import org.apache.calcite.rel.core.TableModify;
 import org.apache.calcite.rel.logical.LogicalTableModify;
 import org.apache.calcite.schema.ModifiableTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.physical.EnumerableModify;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.physical.EnumerableModify;
 
 /**
  * Enumerable modify converter rule.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableScanConverterRule.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/converter/EnumerableScanConverterRule.java
similarity index 87%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableScanConverterRule.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/converter/EnumerableScanConverterRule.java
index 3418d712eb8..9a98645de63 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableScanConverterRule.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/converter/EnumerableScanConverterRule.java
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.converter;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.rule.converter;
 
 import org.apache.calcite.adapter.enumerable.EnumerableConvention;
 import org.apache.calcite.plan.Convention;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.convert.ConverterRule;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.logical.LogicalScan;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.physical.EnumerableScan;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.logical.LogicalScan;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.physical.EnumerableScan;
 
 /**
  * Enumerable scan converter rule.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/transformation/PushFilterIntoScanRule.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/transformation/PushFilterIntoScanRule.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/transformation/PushFilterIntoScanRule.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/transformation/PushFilterIntoScanRule.java
index 536275bd18a..59a27d8f80f 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/transformation/PushFilterIntoScanRule.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/transformation/PushFilterIntoScanRule.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.transformation;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.rule.transformation;
 
 import com.cedarsoftware.util.CaseInsensitiveSet;
 import org.apache.calcite.plan.RelOptRuleCall;
@@ -24,7 +24,7 @@ import org.apache.calcite.rel.logical.LogicalFilter;
 import org.apache.calcite.rel.rules.TransformationRule;
 import org.apache.calcite.rex.RexCall;
 import org.apache.calcite.rex.RexNode;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.logical.LogicalScan;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.logical.LogicalScan;
 import org.immutables.value.Value;
 
 import java.util.Arrays;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/transformation/PushProjectIntoScanRule.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/transformation/PushProjectIntoScanRule.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/transformation/PushProjectIntoScanRule.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/transformation/PushProjectIntoScanRule.java
index a93e7d4de28..b6553927f24 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/transformation/PushProjectIntoScanRule.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/planner/rule/transformation/PushProjectIntoScanRule.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.planner.rule.transformation;
+package org.apache.shardingsphere.sqlfederation.compiler.planner.rule.transformation;
 
 import com.cedarsoftware.util.CaseInsensitiveSet;
 import org.apache.calcite.plan.RelOptRuleCall;
@@ -24,7 +24,7 @@ import org.apache.calcite.rel.logical.LogicalProject;
 import org.apache.calcite.rel.rules.TransformationRule;
 import org.apache.calcite.rex.RexCall;
 import org.apache.calcite.rex.RexNode;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.logical.LogicalScan;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.logical.LogicalScan;
 import org.immutables.value.Value;
 
 import java.util.Arrays;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/SQLNodeConverterEngine.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/SQLNodeConverterEngine.java
similarity index 77%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/SQLNodeConverterEngine.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/SQLNodeConverterEngine.java
index 62d27fec984..e64a69aab56 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/SQLNodeConverterEngine.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/SQLNodeConverterEngine.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -29,13 +29,13 @@ import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.InsertS
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.MergeStatement;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.SelectStatement;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.delete.DeleteStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.explain.ExplainStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.insert.InsertStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.merge.MergeStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.update.UpdateStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.exception.OptimizationSQLNodeConvertException;
+import org.apache.shardingsphere.sqlfederation.compiler.exception.SQLFederationSQLNodeConvertException;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.delete.DeleteStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.explain.ExplainStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.insert.InsertStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.merge.MergeStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.update.UpdateStatementConverter;
 
 import java.util.Optional;
 
@@ -50,7 +50,7 @@ public final class SQLNodeConverterEngine {
      *
      * @param sqlStatement SQL sqlStatement to be converted
      * @return sqlNode converted SQL node
-     * @throws OptimizationSQLNodeConvertException optimization SQL node convert exception
+     * @throws SQLFederationSQLNodeConvertException SQL federation SQL node convert exception
      */
     public static SqlNode convert(final SQLStatement sqlStatement) {
         Optional<SqlNode> result = Optional.empty();
@@ -59,7 +59,7 @@ public final class SQLNodeConverterEngine {
         } else if (sqlStatement instanceof DALStatement) {
             result = convert((DALStatement) sqlStatement);
         }
-        return result.orElseThrow(() -> new OptimizationSQLNodeConvertException(sqlStatement));
+        return result.orElseThrow(() -> new SQLFederationSQLNodeConvertException(sqlStatement));
     }
     
     private static Optional<SqlNode> convert(final DMLStatement sqlStatement) {
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/operator/common/SQLExtensionOperatorTable.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/operator/common/SQLExtensionOperatorTable.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java
index bb23f0ccf6a..49fb541e940 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/operator/common/SQLExtensionOperatorTable.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/common/SQLExtensionOperatorTable.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -27,7 +27,7 @@ import org.apache.calcite.sql.SqlPrefixOperator;
 import org.apache.calcite.sql.type.InferTypes;
 import org.apache.calcite.sql.type.OperandTypes;
 import org.apache.calcite.sql.type.ReturnTypes;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.dialect.mysql.MySQLMatchAgainstOperator;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.dialect.mysql.MySQLMatchAgainstOperator;
 
 /**
  * SQL extension operator table.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/operator/dialect/mysql/MySQLMatchAgainstOperator.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/dialect/mysql/MySQLMatchAgainstOperator.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/operator/dialect/mysql/MySQLMatchAgainstOperator.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/dialect/mysql/MySQLMatchAgainstOperator.java
index 3b3a8e8e1f8..b35d0797437 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/operator/dialect/mysql/MySQLMatchAgainstOperator.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/operator/dialect/mysql/MySQLMatchAgainstOperator.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.dialect.mysql;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.dialect.mysql;
 
 import org.apache.calcite.sql.SqlCall;
 import org.apache.calcite.sql.SqlFunction;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/ExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/ExpressionConverter.java
similarity index 72%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/ExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/ExpressionConverter.java
index 70a9e59698b..19a37bce9bb 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/ExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/ExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -45,28 +45,28 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.subq
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.AggregationProjectionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.DataTypeSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.match.MatchAgainstExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.BetweenExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.BinaryOperationExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.CaseWhenExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.CollateExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ExistsSubqueryExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ExtractArgExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.FunctionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.InExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.IntervalExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ListExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.LiteralExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.MatchExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.NotExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ParameterMarkerExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.RowExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.SubqueryExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.TypeCastExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.UnaryOperationExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.VariableSegmentConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.AggregationProjectionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.DataTypeConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.BetweenExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.BinaryOperationExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.CaseWhenExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.CollateExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ExtractArgExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.InExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.IntervalExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ListExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.LiteralExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.MatchExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.NotExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ParameterMarkerExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.RowExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.TypeCastExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.UnaryOperationExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.VariableSegmentConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ExistsSubqueryExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.FunctionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.SubqueryExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.AggregationProjectionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.DataTypeConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BetweenExpressionConverter.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BetweenExpressionConverter.java
index 88c9603bac9..3544527fe0c 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BetweenExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -24,7 +24,7 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.BetweenExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
index d68d28e6cad..69fffbc08f4 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import com.cedarsoftware.util.CaseInsensitiveMap;
 import com.google.common.base.Preconditions;
@@ -29,8 +29,8 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.BinaryOperationExpression;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.simple.LiteralExpressionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common.SQLExtensionOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Collections;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/CaseWhenExpressionConverter.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/CaseWhenExpressionConverter.java
index b1b970c67bb..84843d2bba7 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CaseWhenExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/CaseWhenExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -28,7 +28,7 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.CaseWhenExpression;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Arrays;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CollateExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/CollateExpressionConverter.java
similarity index 85%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CollateExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/CollateExpressionConverter.java
index d8ba4237319..973ae65629b 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/CollateExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/CollateExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -24,8 +24,8 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.CollateExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common.SQLExtensionOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.LinkedList;
 import java.util.List;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ColumnConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ColumnConverter.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ColumnConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ColumnConverter.java
index b1ac5fe483e..56909c3b0eb 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ColumnConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ColumnConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ExistsSubqueryExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ExistsSubqueryExpressionConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ExistsSubqueryExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ExistsSubqueryExpressionConverter.java
index 9091301cf96..257742824d4 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ExistsSubqueryExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ExistsSubqueryExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -24,7 +24,7 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExistsSubqueryExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
 
 import java.util.Collections;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ExtractArgExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ExtractArgExpressionConverter.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ExtractArgExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ExtractArgExpressionConverter.java
index 83373fc5ec0..878e00e0ab8 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ExtractArgExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ExtractArgExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/FunctionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/FunctionConverter.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/FunctionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/FunctionConverter.java
index 5223bf51122..0b4a11f04c3 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/FunctionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/FunctionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -32,8 +32,8 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.validate.SqlNameMatchers;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.FunctionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.generic.OwnerConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.generic.OwnerConverter;
 
 import java.util.Collection;
 import java.util.Collections;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/InExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/InExpressionConverter.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/InExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/InExpressionConverter.java
index ee06358f363..087c28a3e28 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/InExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/InExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -25,7 +25,7 @@ import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.InExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/IntervalExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/IntervalExpressionConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/IntervalExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/IntervalExpressionConverter.java
index 6e822d9a2a2..645cc836010 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/IntervalExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/IntervalExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -26,8 +26,8 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.IntervalExpression;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.IntervalUnit;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common.SQLExtensionOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ListExpressionConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ListExpressionConverter.java
index 7f0f7e9f808..e7f764b0215 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ListExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -24,7 +24,7 @@ import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ListExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/LiteralExpressionConverter.java
similarity index 97%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/LiteralExpressionConverter.java
index ad63003be69..a697b567f7b 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/LiteralExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/LiteralExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/MatchExpressionConverter.java
similarity index 89%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/MatchExpressionConverter.java
index fbc65092695..cdfcb503bd6 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/MatchExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/MatchExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -27,8 +27,8 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.match.MatchAgainstExpression;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.OwnerSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common.SQLExtensionOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.ArrayList;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/NotExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/NotExpressionConverter.java
similarity index 85%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/NotExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/NotExpressionConverter.java
index f63f93c2c78..49ebaf5062d 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/NotExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/NotExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -23,8 +23,8 @@ import org.apache.calcite.sql.SqlBasicCall;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.NotExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common.SQLExtensionOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.LinkedList;
 import java.util.List;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ParameterMarkerExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ParameterMarkerExpressionConverter.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ParameterMarkerExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ParameterMarkerExpressionConverter.java
index 464fdedcdc9..b134ffbe4b0 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/ParameterMarkerExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/ParameterMarkerExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/RowExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/RowExpressionConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/RowExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/RowExpressionConverter.java
index 9d84b8ac300..eb686e71907 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/RowExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/RowExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -24,7 +24,7 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.RowExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/SubqueryExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/SubqueryExpressionConverter.java
similarity index 87%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/SubqueryExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/SubqueryExpressionConverter.java
index 5a8e25fbf65..2cb39913eb2 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/SubqueryExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/SubqueryExpressionConverter.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.subquery.SubqueryExpressionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/TrimFunctionConverter.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/TrimFunctionConverter.java
index fe1c29ab29a..e5124291913 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TrimFunctionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/TrimFunctionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -31,7 +31,7 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.validate.SqlNameMatchers;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.FunctionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TypeCastExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/TypeCastExpressionConverter.java
similarity index 87%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TypeCastExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/TypeCastExpressionConverter.java
index 04f4e2adf71..fa1e443c9d2 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/TypeCastExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/TypeCastExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -27,8 +27,8 @@ import org.apache.calcite.sql.SqlTypeNameSpec;
 import org.apache.calcite.sql.fun.SqlCastFunction;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.TypeCastExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.type.DataTypeConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.type.DataTypeConverter;
 
 import java.util.Arrays;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/UnaryOperationExpressionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/UnaryOperationExpressionConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/UnaryOperationExpressionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/UnaryOperationExpressionConverter.java
index 89480bc7792..a85468ea2c1 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/UnaryOperationExpressionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/UnaryOperationExpressionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import com.cedarsoftware.util.CaseInsensitiveMap;
 import com.google.common.base.Preconditions;
@@ -27,8 +27,8 @@ import org.apache.calcite.sql.SqlOperator;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.UnaryOperationExpression;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.operator.common.SQLExtensionOperatorTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.operator.common.SQLExtensionOperatorTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.LinkedList;
 import java.util.List;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/VariableSegmentConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/VariableSegmentConverter.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/VariableSegmentConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/VariableSegmentConverter.java
index 74e945c04cc..3cc648b9a02 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/VariableSegmentConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/VariableSegmentConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/WindowFunctionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/WindowFunctionConverter.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/WindowFunctionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/WindowFunctionConverter.java
index 369c1c048e1..0ed7581689c 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/expression/impl/WindowFunctionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/expression/impl/WindowFunctionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -32,7 +32,7 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.validate.SqlNameMatchers;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.FunctionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/TableConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/TableConverter.java
similarity index 83%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/TableConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/TableConverter.java
index c14a1fb55bb..0631c5d9347 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/TableConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/TableConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -26,10 +26,10 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SubqueryTableSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.TableSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl.DeleteMultiTableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl.JoinTableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl.SimpleTableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl.SubqueryTableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl.DeleteMultiTableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl.JoinTableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl.SimpleTableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl.SubqueryTableConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/DeleteMultiTableConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/DeleteMultiTableConverter.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/DeleteMultiTableConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/DeleteMultiTableConverter.java
index 4bf294e442c..a9274955944 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/DeleteMultiTableConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/DeleteMultiTableConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -25,7 +25,7 @@ import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.DeleteMultiTableSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/JoinTableConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/JoinTableConverter.java
similarity index 89%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/JoinTableConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/JoinTableConverter.java
index 0e15ff4e190..4a2f2909bef 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/JoinTableConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/JoinTableConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -28,9 +28,9 @@ import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.JoinTableSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/SimpleTableConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/SimpleTableConverter.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/SimpleTableConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/SimpleTableConverter.java
index 9edf694e4e2..4bf9cd0a848 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/SimpleTableConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/SimpleTableConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -26,7 +26,7 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.TableNameSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.generic.OwnerConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.generic.OwnerConverter;
 
 import java.util.ArrayList;
 import java.util.Arrays;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/SubqueryTableConverter.java
similarity index 89%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/SubqueryTableConverter.java
index d9805715f0c..3b74692a855 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/from/impl/SubqueryTableConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -25,8 +25,8 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SubqueryTableSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/generic/OwnerConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/generic/OwnerConverter.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/generic/OwnerConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/generic/OwnerConverter.java
index 92e55c5a86d..74718e2dadf 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/generic/OwnerConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/generic/OwnerConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.generic;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.generic;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/groupby/GroupByConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/groupby/GroupByConverter.java
similarity index 88%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/groupby/GroupByConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/groupby/GroupByConverter.java
index 5e4c756962d..531f5695ca2 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/groupby/GroupByConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/groupby/GroupByConverter.java
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.groupby;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.groupby;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.order.GroupBySegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.item.OrderByItemConverterUtils;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.item.OrderByItemConverterUtils;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/groupby/HavingConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/groupby/HavingConverter.java
similarity index 87%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/groupby/HavingConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/groupby/HavingConverter.java
index 9910edc85f5..344f761fd7f 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/groupby/HavingConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/groupby/HavingConverter.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.groupby;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.groupby;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.predicate.HavingSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/limit/PaginationValueSQLConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/limit/PaginationValueSQLConverter.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/limit/PaginationValueSQLConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/limit/PaginationValueSQLConverter.java
index bf5d81e4632..debb6147cae 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/limit/PaginationValueSQLConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/limit/PaginationValueSQLConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.limit;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.limit;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/OrderByConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/OrderByConverter.java
similarity index 88%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/OrderByConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/OrderByConverter.java
index 7758daf67b1..d94b12a834b 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/OrderByConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/OrderByConverter.java
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.order.OrderBySegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.item.OrderByItemConverterUtils;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.item.OrderByItemConverterUtils;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/ColumnOrderByItemConverter.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/ColumnOrderByItemConverter.java
index 58c6a8b532e..47b3a99a959 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/ColumnOrderByItemConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.item;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.item;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -27,7 +27,7 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.infra.database.core.metadata.database.enums.NullsOrderType;
 import org.apache.shardingsphere.sql.parser.statement.core.enums.OrderDirection;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.order.item.ColumnOrderByItemSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
 
 import java.util.Collections;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
index 9d20e997f22..b0847f561ea 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.item;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.item;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -26,7 +26,7 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.infra.database.core.metadata.database.enums.NullsOrderType;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.order.item.ExpressionOrderByItemSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Collections;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/IndexOrderByItemConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/IndexOrderByItemConverter.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/IndexOrderByItemConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/IndexOrderByItemConverter.java
index 33ba94f4dcf..d05c1a695c4 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/IndexOrderByItemConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/IndexOrderByItemConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.item;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.item;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/OrderByItemConverterUtils.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/OrderByItemConverterUtils.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/OrderByItemConverterUtils.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/OrderByItemConverterUtils.java
index d6d15789546..e56bd61dbce 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/orderby/item/OrderByItemConverterUtils.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/orderby/item/OrderByItemConverterUtils.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.item;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.item;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/DistinctConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/DistinctConverter.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/DistinctConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/DistinctConverter.java
index 37b7fc7bc34..7e739ed7bf2 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/DistinctConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/DistinctConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/ProjectionsConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/ProjectionsConverter.java
similarity index 81%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/ProjectionsConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/ProjectionsConverter.java
index bd6938f79ed..64f58b73657 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/ProjectionsConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/ProjectionsConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -30,12 +30,12 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.Proj
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ProjectionsSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ShorthandProjectionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.SubqueryProjectionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ParameterMarkerExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.AggregationProjectionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.ColumnProjectionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.ExpressionProjectionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.ShorthandProjectionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl.SubqueryProjectionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ParameterMarkerExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.AggregationProjectionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.ColumnProjectionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.ExpressionProjectionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.ShorthandProjectionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl.SubqueryProjectionConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/AggregationProjectionConverter.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/AggregationProjectionConverter.java
index 8cb1e65af35..69c9bdaef2a 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/AggregationProjectionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl;
 
 import com.cedarsoftware.util.CaseInsensitiveMap;
 import com.google.common.base.Preconditions;
@@ -32,7 +32,7 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.AggregationDistinctProjectionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.AggregationProjectionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Arrays;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ColumnProjectionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ColumnProjectionConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ColumnProjectionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ColumnProjectionConverter.java
index 46efe71ebcd..c1933b272e3 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ColumnProjectionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ColumnProjectionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -25,7 +25,7 @@ import org.apache.calcite.sql.SqlIdentifier;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ColumnProjectionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
 
 import java.util.Arrays;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/DataTypeConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/DataTypeConverter.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/DataTypeConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/DataTypeConverter.java
index 4cd4c303eda..6e2d2bdfcb9 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/DataTypeConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/DataTypeConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ExpressionProjectionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ExpressionProjectionConverter.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ExpressionProjectionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ExpressionProjectionConverter.java
index 98a6a77c689..5a5cf53604e 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ExpressionProjectionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ExpressionProjectionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -25,7 +25,7 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ExpressionProjectionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Arrays;
 import java.util.Collections;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ShorthandProjectionConverter.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ShorthandProjectionConverter.java
index 46a7f244080..03903e8b763 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/ShorthandProjectionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl;
 
 import com.google.common.collect.ImmutableList;
 import lombok.AccessLevel;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/SubqueryProjectionConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/SubqueryProjectionConverter.java
similarity index 92%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/SubqueryProjectionConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/SubqueryProjectionConverter.java
index 2df7a98a526..bc6d0674570 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/projection/impl/SubqueryProjectionConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/projection/impl/SubqueryProjectionConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -26,7 +26,7 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.enums.SubqueryType;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.SubqueryProjectionSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/where/WhereConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/where/WhereConverter.java
similarity index 87%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/where/WhereConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/where/WhereConverter.java
index 59c5be3d5d1..99b07e1a368 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/where/WhereConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/where/WhereConverter.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.where;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.where;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.calcite.sql.SqlNode;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.predicate.WhereSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/window/WindowConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/window/WindowConverter.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/window/WindowConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/window/WindowConverter.java
index 63ac5011e14..589035a1751 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/window/WindowConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/window/WindowConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.window;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.window;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -27,7 +27,7 @@ import org.apache.calcite.sql.SqlWindow;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.WindowItemSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.WindowSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
 
 import java.util.Collection;
 import java.util.LinkedList;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/with/WithConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/with/WithConverter.java
similarity index 90%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/with/WithConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/with/WithConverter.java
index a5a871dab24..b2bf9a5c5d7 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/segment/with/WithConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/segment/with/WithConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.with;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.with;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -28,8 +28,8 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.complex.CommonTableExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.WithSegment;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
 
 import java.util.Collection;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/SQLStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/SQLStatementConverter.java
similarity index 93%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/SQLStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/SQLStatementConverter.java
index 51b42b013aa..49d5f84a22c 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/SQLStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/SQLStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement;
 
 import org.apache.calcite.sql.SqlNode;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/delete/DeleteStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/delete/DeleteStatementConverter.java
similarity index 80%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/delete/DeleteStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/delete/DeleteStatementConverter.java
index fad9e10c36c..01425035250 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/delete/DeleteStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/delete/DeleteStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.delete;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.delete;
 
 import org.apache.calcite.sql.SqlDelete;
 import org.apache.calcite.sql.SqlIdentifier;
@@ -25,12 +25,12 @@ import org.apache.calcite.sql.SqlOrderBy;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.pagination.limit.LimitSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.DeleteStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.limit.PaginationValueSQLConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.OrderByConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.where.WhereConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.with.WithConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.SQLStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.limit.PaginationValueSQLConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.OrderByConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.where.WhereConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.with.WithConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.SQLStatementConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/explain/ExplainStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/explain/ExplainStatementConverter.java
similarity index 82%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/explain/ExplainStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/explain/ExplainStatementConverter.java
index f5c521962af..32e6246cdf5 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/explain/ExplainStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/explain/ExplainStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.explain;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.explain;
 
 import org.apache.calcite.sql.SqlExplain;
 import org.apache.calcite.sql.SqlExplainFormat;
@@ -28,11 +28,11 @@ import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.DeleteS
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.InsertStatement;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.SelectStatement;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.SQLStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.delete.DeleteStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.insert.InsertStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.update.UpdateStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.SQLStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.delete.DeleteStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.insert.InsertStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.update.UpdateStatementConverter;
 
 import java.util.Optional;
 
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/insert/InsertStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/insert/InsertStatementConverter.java
similarity index 85%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/insert/InsertStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/insert/InsertStatementConverter.java
index 5bf7de88cd1..b393eb2c064 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/insert/InsertStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/insert/InsertStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.insert;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.insert;
 
 import org.apache.calcite.sql.SqlBasicCall;
 import org.apache.calcite.sql.SqlInsert;
@@ -28,11 +28,11 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.assignmen
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.InsertStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.SQLStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select.SelectStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.SQLStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select.SelectStatementConverter;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/merge/MergeStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/merge/MergeStatementConverter.java
similarity index 85%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/merge/MergeStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/merge/MergeStatementConverter.java
index 464d2ac1a4a..d4ab112ac96 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/merge/MergeStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/merge/MergeStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.merge;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.merge;
 
 import org.apache.calcite.sql.SqlMerge;
 import org.apache.calcite.sql.SqlNode;
@@ -27,11 +27,11 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.Co
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.MergeStatement;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.where.WhereConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.SQLStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.where.WhereConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.SQLStatementConverter;
 
 import java.util.List;
 import java.util.stream.Collectors;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/select/SelectStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/select/SelectStatementConverter.java
similarity index 75%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/select/SelectStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/select/SelectStatementConverter.java
index e7c91423301..6b1fac3a196 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/select/SelectStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/select/SelectStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.select;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.select;
 
 import org.apache.calcite.sql.SqlBasicCall;
 import org.apache.calcite.sql.SqlNode;
@@ -26,18 +26,18 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.combine.CombineSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.pagination.limit.LimitSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.SelectStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.groupby.GroupByConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.groupby.HavingConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.limit.PaginationValueSQLConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.OrderByConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.DistinctConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.projection.ProjectionsConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.where.WhereConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.window.WindowConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.with.WithConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.SQLStatementConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.type.CombineOperatorConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.groupby.GroupByConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.groupby.HavingConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.limit.PaginationValueSQLConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.OrderByConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.DistinctConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.projection.ProjectionsConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.where.WhereConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.window.WindowConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.with.WithConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.SQLStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.type.CombineOperatorConverter;
 
 import java.util.Arrays;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/update/UpdateStatementConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/update/UpdateStatementConverter.java
similarity index 81%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/update/UpdateStatementConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/update/UpdateStatementConverter.java
index ee4694bfeb3..cdd5577a6f0 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/statement/update/UpdateStatementConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/statement/update/UpdateStatementConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.update;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.update;
 
 import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.SqlNodeList;
@@ -27,13 +27,13 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.Co
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExpressionSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.pagination.limit.LimitSegment;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.ExpressionConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.expression.impl.ColumnConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.from.TableConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.limit.PaginationValueSQLConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.orderby.OrderByConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.segment.where.WhereConverter;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.statement.SQLStatementConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.impl.ColumnConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.expression.ExpressionConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.from.TableConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.limit.PaginationValueSQLConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.orderby.OrderByConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.segment.where.WhereConverter;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.statement.SQLStatementConverter;
 
 import java.util.List;
 import java.util.Optional;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/CombineOperatorConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/CombineOperatorConverter.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/CombineOperatorConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/CombineOperatorConverter.java
index e4d6d99f29b..2baa48fc222 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/CombineOperatorConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/CombineOperatorConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.type;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.type;
 
 import com.google.common.base.Preconditions;
 import lombok.AccessLevel;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/DataTypeConverter.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/DataTypeConverter.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/DataTypeConverter.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/DataTypeConverter.java
index 5ee1baff46b..fbbf4ac853d 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/DataTypeConverter.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/DataTypeConverter.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.type;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.type;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/SQLDialectFactory.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/SQLDialectFactory.java
similarity index 89%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/SQLDialectFactory.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/SQLDialectFactory.java
index 261adf27559..20cfac00a1b 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/SQLDialectFactory.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/SQLDialectFactory.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.sql;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.dialect;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -23,8 +23,8 @@ import org.apache.calcite.sql.SqlDialect;
 import org.apache.calcite.sql.dialect.MssqlSqlDialect;
 import org.apache.calcite.sql.dialect.MysqlSqlDialect;
 import org.apache.calcite.sql.dialect.OracleSqlDialect;
-import org.apache.shardingsphere.sqlfederation.optimizer.sql.dialect.CustomMySQLSQLDialect;
-import org.apache.shardingsphere.sqlfederation.optimizer.sql.dialect.CustomPostgreSQLSQLDialect;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.dialect.impl.CustomMySQLSQLDialect;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.dialect.impl.CustomPostgreSQLSQLDialect;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/dialect/CustomMySQLSQLDialect.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/impl/CustomMySQLSQLDialect.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/dialect/CustomMySQLSQLDialect.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/impl/CustomMySQLSQLDialect.java
index 901199ebdd0..cf9f21bf35d 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/dialect/CustomMySQLSQLDialect.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/impl/CustomMySQLSQLDialect.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.sql.dialect;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.dialect.impl;
 
 import org.apache.calcite.sql.SqlDialect;
 import org.apache.calcite.sql.dialect.MysqlSqlDialect;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/dialect/CustomPostgreSQLSQLDialect.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/impl/CustomPostgreSQLSQLDialect.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/dialect/CustomPostgreSQLSQLDialect.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/impl/CustomPostgreSQLSQLDialect.java
index 7265070ddaf..e2df226afff 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/sql/dialect/CustomPostgreSQLSQLDialect.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/dialect/impl/CustomPostgreSQLSQLDialect.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.sql.dialect;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.dialect.impl;
 
 import org.apache.calcite.sql.SqlDialect;
 import org.apache.calcite.sql.dialect.PostgresqlSqlDialect;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/SQLFederationFunctionRegister.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/SQLFederationFunctionRegister.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/SQLFederationFunctionRegister.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/SQLFederationFunctionRegister.java
index 75e5649fcee..7350b4e2a10 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/SQLFederationFunctionRegister.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/SQLFederationFunctionRegister.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function;
 
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPI;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLFunctionRegister.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/MySQLFunctionRegister.java
similarity index 84%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLFunctionRegister.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/MySQLFunctionRegister.java
index c90928ddc6f..2fa83572a55 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLFunctionRegister.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/MySQLFunctionRegister.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.mysql;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql;
 
 import org.apache.calcite.runtime.SqlFunctions;
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.calcite.schema.impl.ScalarFunctionImpl;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLBinFunction;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLBinFunction;
 
 /**
  * MySQL function register.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLOperatorTable.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/MySQLOperatorTable.java
similarity index 82%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLOperatorTable.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/MySQLOperatorTable.java
index cc8032758a5..3e788fdf9a6 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/MySQLOperatorTable.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/MySQLOperatorTable.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.mysql;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql;
 
 import org.apache.calcite.sql.util.ReflectiveSqlOperatorTable;
 import org.apache.calcite.sql.validate.SqlUserDefinedFunction;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLBitCountFunction;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl.MySQLNotFunction;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLBitCountFunction;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLNotFunction;
 
 /**
  * MySQL operator table.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLBinFunction.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLBinFunction.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLBinFunction.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLBinFunction.java
index fa6106fc4a1..8b7917dbd85 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLBinFunction.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLBinFunction.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLBitCountFunction.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLBitCountFunction.java
similarity index 97%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLBitCountFunction.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLBitCountFunction.java
index ed84e9e134e..01f5380ea77 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLBitCountFunction.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLBitCountFunction.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl;
 
 import com.google.common.collect.ImmutableList;
 import org.apache.calcite.schema.impl.ScalarFunctionImpl;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLNotFunction.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLNotFunction.java
index 6696378953c..ef7a3545708 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/mysql/impl/MySQLNotFunction.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/mysql/impl/MySQLNotFunction.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl;
 
 import com.google.common.collect.ImmutableList;
 import org.apache.calcite.schema.impl.ScalarFunctionImpl;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/opengauss/OpenGaussFunctionRegister.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/opengauss/OpenGaussFunctionRegister.java
similarity index 84%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/opengauss/OpenGaussFunctionRegister.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/opengauss/OpenGaussFunctionRegister.java
index 93ae986edd7..44821424bae 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/opengauss/OpenGaussFunctionRegister.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/opengauss/OpenGaussFunctionRegister.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss;
 
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.calcite.schema.impl.ScalarFunctionImpl;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.impl.OpenGaussSystemFunction;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.PostgreSQLFunctionRegister;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.impl.OpenGaussSystemFunction;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.PostgreSQLFunctionRegister;
 
 /**
  * Opengauss function register.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/opengauss/impl/OpenGaussSystemFunction.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/opengauss/impl/OpenGaussSystemFunction.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/opengauss/impl/OpenGaussSystemFunction.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/opengauss/impl/OpenGaussSystemFunction.java
index a435bcce5f8..b874eaaff80 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/opengauss/impl/OpenGaussSystemFunction.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/opengauss/impl/OpenGaussSystemFunction.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/postgresql/PostgreSQLFunctionRegister.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/postgresql/PostgreSQLFunctionRegister.java
similarity index 84%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/postgresql/PostgreSQLFunctionRegister.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/postgresql/PostgreSQLFunctionRegister.java
index c3c6f0abf8b..1936b7d9cef 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/postgresql/PostgreSQLFunctionRegister.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/postgresql/PostgreSQLFunctionRegister.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql;
 
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.calcite.schema.impl.ScalarFunctionImpl;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister;
-import org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.impl.PostgreSQLSystemFunction;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.impl.PostgreSQLSystemFunction;
 
 /**
  * PostgreSQL function register.
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/postgresql/impl/PostgreSQLSystemFunction.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/postgresql/impl/PostgreSQLSystemFunction.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/postgresql/impl/PostgreSQLSystemFunction.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/postgresql/impl/PostgreSQLSystemFunction.java
index 71e09a3abe0..72364967cff 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/function/postgresql/impl/PostgreSQLSystemFunction.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/function/postgresql/impl/PostgreSQLSystemFunction.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.impl;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.impl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/logical/LogicalScan.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/logical/LogicalScan.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/logical/LogicalScan.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/logical/LogicalScan.java
index 2dc7b7f801c..1d331840a71 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/logical/LogicalScan.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/logical/LogicalScan.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.operator.logical;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.operator.logical;
 
 import lombok.Getter;
 import org.apache.calcite.rel.RelNode;
@@ -24,7 +24,7 @@ import org.apache.calcite.rel.core.TableScan;
 import org.apache.calcite.rel.logical.LogicalFilter;
 import org.apache.calcite.rel.logical.LogicalProject;
 import org.apache.calcite.rel.logical.LogicalTableScan;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.util.LogicalScanPushDownRelBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.util.LogicalScanPushDownRelBuilder;
 
 import java.util.Collections;
 import java.util.Objects;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/physical/EnumerableModify.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/physical/EnumerableModify.java
index 458adb81ce8..458f9bf6460 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/physical/EnumerableModify.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.operator.physical;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.operator.physical;
 
 import org.apache.calcite.adapter.enumerable.EnumerableRel;
 import org.apache.calcite.adapter.enumerable.EnumerableRelImplementor;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableScan.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/physical/EnumerableScan.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableScan.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/physical/EnumerableScan.java
index 742964f0b95..91753425e3a 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableScan.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/physical/EnumerableScan.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.operator.physical;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.operator.physical;
 
 import lombok.Getter;
 import org.apache.calcite.adapter.enumerable.EnumerableConvention;
@@ -35,8 +35,8 @@ import org.apache.calcite.rel.rel2sql.RelToSqlConverter;
 import org.apache.calcite.rel.type.RelDataType;
 import org.apache.calcite.sql.SqlDialect;
 import org.apache.calcite.sql.util.SqlString;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.SQLFederationTable;
-import org.apache.shardingsphere.sqlfederation.optimizer.sql.SQLDialectFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationTable;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.dialect.SQLDialectFactory;
 
 import java.util.Collection;
 import java.util.Collections;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/util/LogicalScanPushDownRelBuilder.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/util/LogicalScanPushDownRelBuilder.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/util/LogicalScanPushDownRelBuilder.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/util/LogicalScanPushDownRelBuilder.java
index 08cb752d81d..a63dce7ad8e 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/util/LogicalScanPushDownRelBuilder.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/util/LogicalScanPushDownRelBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.operator.util;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.operator.util;
 
 import org.apache.calcite.plan.Contexts;
 import org.apache.calcite.plan.RelOptCluster;
diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/util/LogicalScanRelShuttle.java b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/util/LogicalScanRelShuttle.java
similarity index 91%
rename from kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/util/LogicalScanRelShuttle.java
rename to kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/util/LogicalScanRelShuttle.java
index da0e030d249..0d99e240a4c 100644
--- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/util/LogicalScanRelShuttle.java
+++ b/kernel/sql-federation/compiler/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/sql/operator/util/LogicalScanRelShuttle.java
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.operator.util;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.operator.util;
 
 import lombok.AccessLevel;
 import lombok.RequiredArgsConstructor;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.RelShuttleImpl;
 import org.apache.calcite.rel.core.TableScan;
-import org.apache.shardingsphere.sqlfederation.optimizer.operator.logical.LogicalScan;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.operator.logical.LogicalScan;
 
 /**
  * Logical scan rel shuttle.
diff --git a/kernel/sql-federation/optimizer/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder b/kernel/sql-federation/compiler/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder
similarity index 50%
rename from kernel/sql-federation/optimizer/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder
rename to kernel/sql-federation/compiler/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder
index 62bf68f5b45..79dd367797c 100644
--- a/kernel/sql-federation/optimizer/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.ConnectionConfigBuilder
+++ b/kernel/sql-federation/compiler/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilder
@@ -15,10 +15,10 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.H2ConnectionConfigBuilder
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.MySQLConnectionConfigBuilder
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.PostgreSQLConnectionConfigBuilder
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.OpenGaussConnectionConfigBuilder
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.SQLServerConnectionConfigBuilder
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.OracleConnectionConfigBuilder
-org.apache.shardingsphere.sqlfederation.optimizer.context.connection.config.impl.SQL92ConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.H2ConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.MySQLConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.PostgreSQLConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.OpenGaussConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.SQLServerConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.OracleConnectionConfigBuilder
+org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.SQL92ConnectionConfigBuilder
diff --git a/kernel/sql-federation/optimizer/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister b/kernel/sql-federation/compiler/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister
similarity index 73%
rename from kernel/sql-federation/optimizer/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister
rename to kernel/sql-federation/compiler/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister
index 469299d5733..ff6056c052e 100644
--- a/kernel/sql-federation/optimizer/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.optimizer.function.SQLFederationFunctionRegister
+++ b/kernel/sql-federation/compiler/src/main/resources/META-INF/services/org.apache.shardingsphere.sqlfederation.compiler.sql.function.SQLFederationFunctionRegister
@@ -15,6 +15,6 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.sqlfederation.optimizer.function.mysql.MySQLFunctionRegister
-org.apache.shardingsphere.sqlfederation.optimizer.function.opengauss.OpenGaussFunctionRegister
-org.apache.shardingsphere.sqlfederation.optimizer.function.postgresql.PostgreSQLFunctionRegister
+org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.MySQLFunctionRegister
+org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.OpenGaussFunctionRegister
+org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.PostgreSQLFunctionRegister
diff --git a/kernel/sql-federation/optimizer/src/main/resources/saffron.properties b/kernel/sql-federation/compiler/src/main/resources/saffron.properties
similarity index 100%
rename from kernel/sql-federation/optimizer/src/main/resources/saffron.properties
rename to kernel/sql-federation/compiler/src/main/resources/saffron.properties
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/SQLStatementCompilerIT.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
similarity index 97%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/SQLStatementCompilerIT.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
index b4e160535b2..1fe8747357f 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/SQLStatementCompilerIT.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.it;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler.it;
 
 import lombok.SneakyThrows;
 import org.apache.calcite.adapter.enumerable.EnumerableConvention;
@@ -35,11 +35,11 @@ import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import org.apache.shardingsphere.parser.rule.SQLParserRule;
 import org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeFactory;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.SQLFederationSchema;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.util.SQLFederationValidatorUtils;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.builder.SQLFederationPlannerBuilder;
-import org.apache.shardingsphere.sqlfederation.optimizer.statement.SQLStatementCompiler;
+import org.apache.shardingsphere.sqlfederation.compiler.compiler.SQLStatementCompiler;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationSchema;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.util.SQLFederationValidatorUtils;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.builder.SQLFederationPlannerBuilder;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCase.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCase.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCase.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCase.java
index fa8a25fe305..88bee71830c 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCase.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCase.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.it;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler.it;
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCaseAssertion.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCaseAssertion.java
similarity index 94%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCaseAssertion.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCaseAssertion.java
index b1f07aead15..aa3c3217bff 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCaseAssertion.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCaseAssertion.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.it;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler.it;
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCases.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCases.java
similarity index 95%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCases.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCases.java
index b84e92c7806..02e360f67fd 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCases.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCases.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.it;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler.it;
 
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCasesLoader.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCasesLoader.java
similarity index 97%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCasesLoader.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCasesLoader.java
index c8413dfc7c4..5807cb3e8a8 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/it/TestCasesLoader.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/TestCasesLoader.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.it;
+package org.apache.shardingsphere.sqlfederation.compiler.compiler.it;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.dataformat.xml.XmlMapper;
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContextTest.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContextTest.java
similarity index 81%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContextTest.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContextTest.java
index 0407d337cfd..039c527b5cc 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/context/OptimizerContextTest.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/context/CompilerContextTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.context;
+package org.apache.shardingsphere.sqlfederation.compiler.context;
 
 import org.apache.calcite.config.CalciteConnectionConfig;
 import org.apache.calcite.jdbc.CalciteSchema;
@@ -33,23 +33,23 @@ import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-class OptimizerContextTest {
+class CompilerContextTest {
     
     @Test
     void assertGetSqlParserRule() {
-        OptimizerContext actual = OptimizerContextFactory.create(Collections.singleton(mockDatabase()));
+        CompilerContext actual = CompilerContextFactory.create(Collections.singleton(mockDatabase()));
         assertThat(actual.getSqlParserRule(), instanceOf(SQLParserRule.class));
     }
     
     @Test
-    void assertGetParserContext() {
-        OptimizerContext actual = OptimizerContextFactory.create(Collections.singleton(mockDatabase()));
+    void assertGetCalciteSchema() {
+        CompilerContext actual = CompilerContextFactory.create(Collections.singleton(mockDatabase()));
         assertThat(actual.getCalciteSchema(), instanceOf(CalciteSchema.class));
     }
     
     @Test
-    void assertGetOptimizerMetaData() {
-        OptimizerContext actual = OptimizerContextFactory.create(Collections.singleton(mockDatabase()));
+    void assertGetConnectionConfig() {
+        CompilerContext actual = CompilerContextFactory.create(Collections.singleton(mockDatabase()));
         assertThat(actual.getConnectionConfig(), instanceOf(CalciteConnectionConfig.class));
     }
     
diff --git a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/CombineOperatorConverterTest.java b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/CombineOperatorConverterTest.java
similarity index 96%
rename from kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/CombineOperatorConverterTest.java
rename to kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/CombineOperatorConverterTest.java
index 58b7c5e0807..835a967aa61 100644
--- a/kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/type/CombineOperatorConverterTest.java
+++ b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/sql/ast/converter/type/CombineOperatorConverterTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sqlfederation.optimizer.converter.type;
+package org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.type;
 
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.shardingsphere.sql.parser.statement.core.enums.CombineType;
diff --git a/kernel/sql-federation/optimizer/src/test/resources/cases/federation-delete-sql-cases.xml b/kernel/sql-federation/compiler/src/test/resources/cases/federation-delete-sql-cases.xml
similarity index 100%
rename from kernel/sql-federation/optimizer/src/test/resources/cases/federation-delete-sql-cases.xml
rename to kernel/sql-federation/compiler/src/test/resources/cases/federation-delete-sql-cases.xml
diff --git a/kernel/sql-federation/optimizer/src/test/resources/cases/federation-query-sql-cases.xml b/kernel/sql-federation/compiler/src/test/resources/cases/federation-query-sql-cases.xml
similarity index 100%
rename from kernel/sql-federation/optimizer/src/test/resources/cases/federation-query-sql-cases.xml
rename to kernel/sql-federation/compiler/src/test/resources/cases/federation-query-sql-cases.xml
diff --git a/kernel/sql-federation/optimizer/src/test/resources/logback-test.xml b/kernel/sql-federation/compiler/src/test/resources/logback-test.xml
similarity index 100%
rename from kernel/sql-federation/optimizer/src/test/resources/logback-test.xml
rename to kernel/sql-federation/compiler/src/test/resources/logback-test.xml
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngine.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngine.java
index 96d3e999e8d..007c2da6135 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngine.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngine.java
@@ -57,15 +57,15 @@ import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.SelectS
 import org.apache.shardingsphere.sqlfederation.engine.processor.SQLFederationProcessor;
 import org.apache.shardingsphere.sqlfederation.engine.processor.SQLFederationProcessorFactory;
 import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationCompilerEngine;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.exception.SQLFederationUnsupportedSQLException;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.catalog.SQLFederationCatalogReader;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeFactory;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.util.SQLFederationValidatorUtils;
-import org.apache.shardingsphere.sqlfederation.optimizer.planner.cache.ExecutionPlanCacheKey;
-import org.apache.shardingsphere.sqlfederation.optimizer.statement.SQLStatementCompiler;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationCompilerEngine;
+import org.apache.shardingsphere.sqlfederation.compiler.compiler.SQLStatementCompiler;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContext;
+import org.apache.shardingsphere.sqlfederation.compiler.exception.SQLFederationUnsupportedSQLException;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.catalog.SQLFederationCatalogReader;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.util.SQLFederationValidatorUtils;
+import org.apache.shardingsphere.sqlfederation.compiler.planner.cache.ExecutionPlanCacheKey;
 import org.apache.shardingsphere.sqlfederation.rule.SQLFederationRule;
 import org.apache.shardingsphere.sqlfederation.spi.SQLFederationDecider;
 
@@ -167,6 +167,7 @@ public final class SQLFederationEngine implements AutoCloseable {
         return sqlStatementContext instanceof SelectStatementContext;
     }
     
+    // TODO remove this logic when statistic pass through to db finish
     private boolean isQuerySystemSchema(final QueryContext queryContext) {
         SQLStatementContext sqlStatementContext = queryContext.getSqlStatementContext();
         if (!(sqlStatementContext instanceof SelectStatementContext)) {
@@ -194,7 +195,7 @@ public final class SQLFederationEngine implements AutoCloseable {
             SQLStatementContext sqlStatementContext = queryContext.getSqlStatementContext();
             SqlToRelConverter converter = creeateSQLToRelConverter(sqlStatementContext, processor.getConvention());
             schemaPlus = converter.validator.getCatalogReader().getRootSchema().plus();
-            processor.prepare(prepareEngine, callback, currentDatabaseName, currentSchemaName, federationContext, sqlFederationRule.getOptimizerContext(), schemaPlus);
+            processor.prepare(prepareEngine, callback, currentDatabaseName, currentSchemaName, federationContext, sqlFederationRule.getCompilerContext(), schemaPlus);
             SQLFederationExecutionPlan executionPlan =
                     compileQuery(converter, currentDatabaseName, currentSchemaName, federationContext.getMetaData(), sqlStatementContext, queryContext.getSql(), processor.getConvention());
             resultSet = processor.executePlan(prepareEngine, callback, executionPlan, converter, federationContext, schemaPlus);
@@ -209,16 +210,16 @@ public final class SQLFederationEngine implements AutoCloseable {
     }
     
     private SqlToRelConverter creeateSQLToRelConverter(final SQLStatementContext sqlStatementContext, final Convention convention) {
-        OptimizerContext optimizerContext = sqlFederationRule.getOptimizerContext();
+        CompilerContext compilerContext = sqlFederationRule.getCompilerContext();
         JavaTypeFactory typeFactory = SQLFederationDataTypeFactory.getInstance();
-        CalciteConnectionConfig connectionConfig = optimizerContext.getConnectionConfig();
+        CalciteConnectionConfig connectionConfig = compilerContext.getConnectionConfig();
         DatabaseType databaseType = sqlStatementContext.getDatabaseType();
         DialectDatabaseMetaData dialectDatabaseMetaData = new DatabaseTypeRegistry(databaseType).getDialectDatabaseMetaData();
         List<String> schemaPath = getSchemaPath(dialectDatabaseMetaData, sqlStatementContext);
-        CalciteCatalogReader catalogReader = new SQLFederationCatalogReader(optimizerContext.getCalciteSchema(), schemaPath, typeFactory, connectionConfig);
+        CalciteCatalogReader catalogReader = new SQLFederationCatalogReader(compilerContext.getCalciteSchema(), schemaPath, typeFactory, connectionConfig);
         SqlValidator validator = SQLFederationValidatorUtils.createSqlValidator(catalogReader, typeFactory, databaseType, connectionConfig);
         RelOptCluster relOptCluster = SQLFederationValidatorUtils.createRelOptCluster(typeFactory, convention);
-        return SQLFederationValidatorUtils.createSqlToRelConverter(catalogReader, validator, relOptCluster, optimizerContext.getSqlParserRule(), databaseType, true);
+        return SQLFederationValidatorUtils.createSqlToRelConverter(catalogReader, validator, relOptCluster, compilerContext.getSqlParserRule(), databaseType, true);
     }
     
     private List<String> getSchemaPath(final DialectDatabaseMetaData dialectDatabaseMetaData, final SQLStatementContext sqlStatementContext) {
@@ -248,7 +249,7 @@ public final class SQLFederationEngine implements AutoCloseable {
             String originalSchema = each.getTableName().getTableBoundInfo().map(optional -> optional.getOriginalSchema().getValue()).orElse(currentSchemaName);
             ShardingSphereTable table = metaData.getDatabase(originalDatabase).getSchema(originalSchema).getTable(each.getTableName().getIdentifier().getValue());
             ShardingSpherePreconditions.checkNotNull(table, () -> new NoSuchTableException(each.getTableName().getIdentifier().getValue()));
-            result.getTableMetaDataVersions().put(Joiner.on("_").join(Arrays.asList(originalDatabase, originalSchema, table.getName())), 0);
+            result.getTableMetaDataVersions().put(Joiner.on(".").join(Arrays.asList(originalDatabase, originalSchema, table.getName())), 0);
         }
         return result;
     }
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/SQLFederationProcessor.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/SQLFederationProcessor.java
index 455f0834c26..4895625ee23 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/SQLFederationProcessor.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/SQLFederationProcessor.java
@@ -26,8 +26,8 @@ import org.apache.shardingsphere.infra.executor.sql.execute.result.ExecuteResult
 import org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine;
 import org.apache.shardingsphere.infra.session.query.QueryContext;
 import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContext;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContext;
 
 import java.sql.Connection;
 import java.sql.ResultSet;
@@ -45,11 +45,11 @@ public interface SQLFederationProcessor {
      * @param currentDatabaseName current database name
      * @param currentSchemaName current schema name
      * @param federationContext federation context
-     * @param optimizerContext optimizer context
+     * @param compilerContext compiler context
      * @param schemaPlus sql federation schema
      */
     void prepare(DriverExecutionPrepareEngine<JDBCExecutionUnit, Connection> prepareEngine, JDBCExecutorCallback<? extends ExecuteResult> callback,
-                 String currentDatabaseName, String currentSchemaName, SQLFederationContext federationContext, OptimizerContext optimizerContext, SchemaPlus schemaPlus);
+                 String currentDatabaseName, String currentSchemaName, SQLFederationContext federationContext, CompilerContext compilerContext, SchemaPlus schemaPlus);
     
     /**
      * Release.
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/impl/StandardSQLFederationProcessor.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/impl/StandardSQLFederationProcessor.java
index 7e673f482c7..f12c70574f5 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/impl/StandardSQLFederationProcessor.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/engine/processor/impl/StandardSQLFederationProcessor.java
@@ -49,10 +49,10 @@ import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationBin
 import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationContext;
 import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationExecutorContext;
 import org.apache.shardingsphere.sqlfederation.executor.enumerable.EnumerableScanExecutor;
-import org.apache.shardingsphere.sqlfederation.optimizer.SQLFederationExecutionPlan;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.exception.SQLFederationSchemaNotFoundException;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.SQLFederationTable;
+import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContext;
+import org.apache.shardingsphere.sqlfederation.compiler.exception.SQLFederationSchemaNotFoundException;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationTable;
 import org.apache.shardingsphere.sqlfederation.resultset.SQLFederationResultSet;
 
 import java.sql.Connection;
@@ -77,14 +77,14 @@ public final class StandardSQLFederationProcessor implements SQLFederationProces
     
     @Override
     public void prepare(final DriverExecutionPrepareEngine<JDBCExecutionUnit, Connection> prepareEngine, final JDBCExecutorCallback<? extends ExecuteResult> callback,
-                        final String currentDatabaseName, final String currentSchemaName, final SQLFederationContext federationContext, final OptimizerContext optimizerContext,
+                        final String currentDatabaseName, final String currentSchemaName, final SQLFederationContext federationContext, final CompilerContext compilerContext,
                         final SchemaPlus schemaPlus) {
         if (null == schemaPlus) {
             return;
         }
         SQLFederationExecutorContext executorContext = new SQLFederationExecutorContext(currentDatabaseName, currentSchemaName, metaData.getProps());
         EnumerableScanExecutor scanExecutor =
-                new EnumerableScanExecutor(prepareEngine, jdbcExecutor, callback, optimizerContext, executorContext, federationContext, metaData.getGlobalRuleMetaData(), statistics);
+                new EnumerableScanExecutor(prepareEngine, jdbcExecutor, callback, compilerContext, executorContext, federationContext, metaData.getGlobalRuleMetaData(), statistics);
         SQLStatementContext sqlStatementContext = federationContext.getQueryContext().getSqlStatementContext();
         Collection<SimpleTableSegment> simpleTables = sqlStatementContext instanceof TableAvailable
                 ? ((TableAvailable) sqlStatementContext).getTablesContext().getSimpleTables()
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetMetaData.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetMetaData.java
index 26c223d49f3..8fea56a1cdf 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetMetaData.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetMetaData.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.infra.binder.context.segment.select.projection.
 import org.apache.shardingsphere.infra.binder.context.segment.select.projection.impl.ColumnProjection;
 import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeFactory;
 import org.apache.shardingsphere.sqlfederation.resultset.converter.SQLFederationColumnTypeConverter;
 
 import java.math.BigInteger;
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/rule/SQLFederationRule.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/rule/SQLFederationRule.java
index 6db0387b068..12e840b6d15 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/rule/SQLFederationRule.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/rule/SQLFederationRule.java
@@ -22,8 +22,8 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.rule.scope.GlobalRule;
 import org.apache.shardingsphere.sqlfederation.config.SQLFederationRuleConfiguration;
 import org.apache.shardingsphere.sqlfederation.constant.SQLFederationOrder;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContextFactory;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContext;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContextFactory;
 
 import java.util.Collection;
 import java.util.concurrent.atomic.AtomicReference;
@@ -36,25 +36,25 @@ public final class SQLFederationRule implements GlobalRule {
     
     private final SQLFederationRuleConfiguration configuration;
     
-    private final AtomicReference<OptimizerContext> optimizerContext;
+    private final AtomicReference<CompilerContext> compilerContext;
     
     public SQLFederationRule(final SQLFederationRuleConfiguration ruleConfig, final Collection<ShardingSphereDatabase> databases) {
         configuration = ruleConfig;
-        optimizerContext = new AtomicReference<>(OptimizerContextFactory.create(databases));
+        compilerContext = new AtomicReference<>(CompilerContextFactory.create(databases));
     }
     
     @Override
     public void refresh(final Collection<ShardingSphereDatabase> databases, final GlobalRuleChangedType changedType) {
-        optimizerContext.set(OptimizerContextFactory.create(databases));
+        compilerContext.set(CompilerContextFactory.create(databases));
     }
     
     /**
-     * Get optimizer context.
+     * Get compiler context.
      *
-     * @return optimizer context
+     * @return compiler context
      */
-    public OptimizerContext getOptimizerContext() {
-        return optimizerContext.get();
+    public CompilerContext getCompilerContext() {
+        return compilerContext.get();
     }
     
     @Override
diff --git a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetTest.java b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetTest.java
index 277a872a272..76e23e2b21b 100644
--- a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetTest.java
+++ b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/resultset/SQLFederationResultSetTest.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.binder.context.segment.select.projection.
 import org.apache.shardingsphere.infra.binder.context.segment.select.projection.impl.ColumnProjection;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.SQLFederationSchema;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationSchema;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
diff --git a/kernel/sql-federation/executor/pom.xml b/kernel/sql-federation/executor/pom.xml
index 913bdf3fd8b..6cde75c93f8 100644
--- a/kernel/sql-federation/executor/pom.xml
+++ b/kernel/sql-federation/executor/pom.xml
@@ -29,7 +29,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-sql-federation-optimizer</artifactId>
+            <artifactId>shardingsphere-sql-federation-compiler</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
diff --git a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
index bcc02346ba5..6e441ce3aed 100644
--- a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
+++ b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
@@ -61,10 +61,10 @@ import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationExe
 import org.apache.shardingsphere.sqlfederation.executor.enumerator.JDBCRowEnumerator;
 import org.apache.shardingsphere.sqlfederation.executor.enumerator.MemoryRowEnumerator;
 import org.apache.shardingsphere.sqlfederation.executor.utils.StatisticsAssembleUtils;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.EmptyRowEnumerator;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.ScanExecutor;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.ScanExecutorContext;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContext;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.EmptyRowEnumerator;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.ScanExecutor;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.ScanExecutorContext;
 
 import java.sql.Connection;
 import java.sql.PreparedStatement;
@@ -90,7 +90,7 @@ public final class EnumerableScanExecutor implements ScanExecutor {
     
     private final JDBCExecutorCallback<? extends ExecuteResult> callback;
     
-    private final OptimizerContext optimizerContext;
+    private final CompilerContext compilerContext;
     
     private final SQLFederationExecutorContext executorContext;
     
@@ -217,7 +217,7 @@ public final class EnumerableScanExecutor implements ScanExecutor {
     
     private QueryContext createQueryContext(final ShardingSphereMetaData metaData, final ScanExecutorContext sqlString, final DatabaseType databaseType, final boolean useCache) {
         String sql = sqlString.getSql().replace(System.lineSeparator(), " ");
-        SQLStatement sqlStatement = optimizerContext.getSqlParserRule().getSQLParserEngine(databaseType).parse(sql, useCache);
+        SQLStatement sqlStatement = compilerContext.getSqlParserRule().getSQLParserEngine(databaseType).parse(sql, useCache);
         List<Object> params = getParameters(sqlString.getParamIndexes());
         HintValueContext hintValueContext = new HintValueContext();
         SQLStatementContext sqlStatementContext = new SQLBindEngine(metaData, executorContext.getCurrentDatabaseName(), hintValueContext).bind(sqlStatement, params);
diff --git a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/utils/EnumeratorUtils.java b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/utils/EnumeratorUtils.java
index 64fa788258d..c67c5485cb5 100644
--- a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/utils/EnumeratorUtils.java
+++ b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/utils/EnumeratorUtils.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.exception.kernel.data.UnsupportedDataTypeConversionException;
 import org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.util.ResultSetUtils;
 import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.datatype.SQLFederationDataTypeBuilder;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.datatype.SQLFederationDataTypeBuilder;
 
 import java.sql.SQLFeatureNotSupportedException;
 import java.util.HashMap;
diff --git a/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutorTest.java b/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutorTest.java
index 535488da371..941bd0f7b1f 100644
--- a/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutorTest.java
+++ b/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutorTest.java
@@ -31,8 +31,8 @@ import org.apache.shardingsphere.infra.metadata.statistics.TableStatistics;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationContext;
 import org.apache.shardingsphere.sqlfederation.executor.context.SQLFederationExecutorContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContext;
-import org.apache.shardingsphere.sqlfederation.optimizer.metadata.schema.table.ScanExecutorContext;
+import org.apache.shardingsphere.sqlfederation.compiler.context.CompilerContext;
+import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.table.ScanExecutorContext;
 import org.junit.jupiter.api.Test;
 
 import java.sql.Types;
@@ -50,7 +50,7 @@ class EnumerableScanExecutorTest {
     
     @Test
     void assertExecuteWithStatistics() {
-        OptimizerContext optimizerContext = mock(OptimizerContext.class, RETURNS_DEEP_STUBS);
+        CompilerContext compilerContext = mock(CompilerContext.class, RETURNS_DEEP_STUBS);
         SQLFederationExecutorContext executorContext = mock(SQLFederationExecutorContext.class);
         when(executorContext.getCurrentDatabaseName()).thenReturn("foo_db");
         when(executorContext.getCurrentSchemaName()).thenReturn("pg_catalog");
@@ -69,7 +69,7 @@ class EnumerableScanExecutorTest {
         SelectStatementContext selectStatementContext = mockSelectStatementContext();
         when(federationContext.getQueryContext().getSqlStatementContext()).thenReturn(selectStatementContext);
         Enumerable<Object> enumerable =
-                new EnumerableScanExecutor(null, null, null, optimizerContext, executorContext, federationContext, null, statistics).execute(table, mock(ScanExecutorContext.class));
+                new EnumerableScanExecutor(null, null, null, compilerContext, executorContext, federationContext, null, statistics).execute(table, mock(ScanExecutorContext.class));
         try (Enumerator<Object> actual = enumerable.enumerator()) {
             actual.moveNext();
             Object row = actual.current();
diff --git a/kernel/sql-federation/pom.xml b/kernel/sql-federation/pom.xml
index 2faf2c462e0..c44f4573228 100644
--- a/kernel/sql-federation/pom.xml
+++ b/kernel/sql-federation/pom.xml
@@ -31,7 +31,7 @@
         <module>api</module>
         <module>core</module>
         <module>distsql</module>
-        <module>optimizer</module>
+        <module>compiler</module>
         <module>executor</module>
     </modules>
 </project>
diff --git a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/SQLNodeConverterEngineIT.java b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/SQLNodeConverterEngineIT.java
similarity index 92%
rename from test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/SQLNodeConverterEngineIT.java
rename to test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/SQLNodeConverterEngineIT.java
index 968ecead470..3c1a3969f06 100644
--- a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/SQLNodeConverterEngineIT.java
+++ b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/SQLNodeConverterEngineIT.java
@@ -15,16 +15,16 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.it.optimizer.converter;
+package org.apache.shardingsphere.test.it.optimizer.sqlnode.converter;
 
 import org.apache.shardingsphere.sql.parser.api.CacheOption;
 import org.apache.shardingsphere.sql.parser.api.SQLParserEngine;
 import org.apache.shardingsphere.sql.parser.api.SQLStatementVisitorEngine;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import org.apache.shardingsphere.sqlfederation.optimizer.converter.SQLNodeConverterEngine;
-import org.apache.shardingsphere.sqlfederation.optimizer.sql.SQLDialectFactory;
-import org.apache.shardingsphere.test.it.optimizer.converter.cases.SQLNodeConverterTestCases;
-import org.apache.shardingsphere.test.it.optimizer.converter.cases.SQLNodeConverterTestCasesRegistry;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.ast.converter.SQLNodeConverterEngine;
+import org.apache.shardingsphere.sqlfederation.compiler.sql.dialect.SQLDialectFactory;
+import org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.SQLNodeConverterTestCases;
+import org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.SQLNodeConverterTestCasesRegistry;
 import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserTestParameter;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.SQLParserTestCases;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.registry.SQLParserTestCasesRegistry;
diff --git a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCaseLoaderCallback.java b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCaseLoaderCallback.java
similarity index 92%
rename from test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCaseLoaderCallback.java
rename to test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCaseLoaderCallback.java
index c4c0ca4d4a8..21673d0b507 100644
--- a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCaseLoaderCallback.java
+++ b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCaseLoaderCallback.java
@@ -15,11 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.it.optimizer.converter.cases;
+package org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases;
 
 import com.google.common.base.Preconditions;
-import org.apache.shardingsphere.test.it.optimizer.converter.cases.jaxb.RootSQLNodeConverterTestCases;
-import org.apache.shardingsphere.test.it.optimizer.converter.cases.jaxb.SQLNodeConverterTestCase;
+import org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.jaxb.RootSQLNodeConverterTestCases;
+import org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.jaxb.SQLNodeConverterTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.loader.CaseFileLoader;
 import org.apache.shardingsphere.test.it.sql.parser.internal.loader.CaseLoaderCallback;
 
diff --git a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCases.java b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCases.java
similarity index 90%
rename from test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCases.java
rename to test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCases.java
index d597c1683d7..97cb0c5f37c 100644
--- a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCases.java
+++ b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCases.java
@@ -15,11 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.it.optimizer.converter.cases;
+package org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases;
 
 import com.google.common.base.Preconditions;
 import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.test.it.optimizer.converter.cases.jaxb.SQLNodeConverterTestCase;
+import org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.jaxb.SQLNodeConverterTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.sql.type.SQLCaseType;
 
 import java.util.Map;
diff --git a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCasesRegistry.java b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCasesRegistry.java
similarity index 95%
rename from test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCasesRegistry.java
rename to test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCasesRegistry.java
index 3acd5163ddc..09c6f02ee44 100644
--- a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/SQLNodeConverterTestCasesRegistry.java
+++ b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/SQLNodeConverterTestCasesRegistry.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.it.optimizer.converter.cases;
+package org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases;
 
 import lombok.Getter;
 import org.apache.shardingsphere.test.it.sql.parser.internal.loader.CaseLoaderTemplate;
diff --git a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/jaxb/RootSQLNodeConverterTestCases.java b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/jaxb/RootSQLNodeConverterTestCases.java
similarity index 97%
rename from test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/jaxb/RootSQLNodeConverterTestCases.java
rename to test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/jaxb/RootSQLNodeConverterTestCases.java
index dbc7ab15a3a..790b7c565f4 100644
--- a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/jaxb/RootSQLNodeConverterTestCases.java
+++ b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/jaxb/RootSQLNodeConverterTestCases.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.it.optimizer.converter.cases.jaxb;
+package org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.jaxb;
 
 import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
diff --git a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/jaxb/SQLNodeConverterTestCase.java b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/jaxb/SQLNodeConverterTestCase.java
similarity index 94%
rename from test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/jaxb/SQLNodeConverterTestCase.java
rename to test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/jaxb/SQLNodeConverterTestCase.java
index e0b7a5f3b7e..5dc0ef21e33 100644
--- a/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/converter/cases/jaxb/SQLNodeConverterTestCase.java
+++ b/test/it/optimizer/src/test/java/org/apache/shardingsphere/test/it/optimizer/sqlnode/converter/cases/jaxb/SQLNodeConverterTestCase.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.it.optimizer.converter.cases.jaxb;
+package org.apache.shardingsphere.test.it.optimizer.sqlnode.converter.cases.jaxb;
 
 import lombok.Getter;
 import lombok.Setter;