You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ch...@apache.org on 2023/06/25 09:25:23 UTC
[shardingsphere] branch master updated: Replace globalRuleMetaData.getSingleRule(SQLFederationRule.class) with sqlFederationRule (#26543)
This is an automated email from the ASF dual-hosted git repository.
chengzhang 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 27c3c6a7323 Replace globalRuleMetaData.getSingleRule(SQLFederationRule.class) with sqlFederationRule (#26543)
27c3c6a7323 is described below
commit 27c3c6a7323661cf3ee4bae4e6535913f3463e4a
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Sun Jun 25 17:25:17 2023 +0800
Replace globalRuleMetaData.getSingleRule(SQLFederationRule.class) with sqlFederationRule (#26543)
(cherry picked from commit 1799c23d6f047b568370c8fc8005d420edbb1547)
---
.../sqlfederation/engine/SQLFederationEngine.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
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 555c38451ad..217e66f8116 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
@@ -43,18 +43,18 @@ import org.apache.shardingsphere.infra.metadata.database.schema.util.SystemSchem
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPILoader;
-import org.apache.shardingsphere.sqlfederation.executor.SQLFederationDataContext;
-import org.apache.shardingsphere.sqlfederation.executor.SQLFederationExecutorContext;
-import org.apache.shardingsphere.sqlfederation.executor.TableScanExecutorContext;
-import org.apache.shardingsphere.sqlfederation.executor.enumerable.EnumerablePushDownTableScanExecutor;
-import org.apache.shardingsphere.sqlfederation.resultset.SQLFederationResultSet;
import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationCompilerEngine;
import org.apache.shardingsphere.sqlfederation.compiler.SQLFederationExecutionPlan;
-import org.apache.shardingsphere.sqlfederation.compiler.statement.SQLStatementCompiler;
import org.apache.shardingsphere.sqlfederation.compiler.context.OptimizerContext;
import org.apache.shardingsphere.sqlfederation.compiler.context.planner.OptimizerPlannerContext;
import org.apache.shardingsphere.sqlfederation.compiler.metadata.schema.SQLFederationTable;
import org.apache.shardingsphere.sqlfederation.compiler.planner.cache.ExecutionPlanCacheKey;
+import org.apache.shardingsphere.sqlfederation.compiler.statement.SQLStatementCompiler;
+import org.apache.shardingsphere.sqlfederation.executor.SQLFederationDataContext;
+import org.apache.shardingsphere.sqlfederation.executor.SQLFederationExecutorContext;
+import org.apache.shardingsphere.sqlfederation.executor.TableScanExecutorContext;
+import org.apache.shardingsphere.sqlfederation.executor.enumerable.EnumerablePushDownTableScanExecutor;
+import org.apache.shardingsphere.sqlfederation.resultset.SQLFederationResultSet;
import org.apache.shardingsphere.sqlfederation.rule.SQLFederationRule;
import org.apache.shardingsphere.sqlfederation.spi.SQLFederationDecider;
@@ -121,7 +121,7 @@ public final class SQLFederationEngine implements AutoCloseable {
return true;
}
// TODO END
- boolean sqlFederationEnabled = globalRuleMetaData.getSingleRule(SQLFederationRule.class).getConfiguration().isSqlFederationEnabled();
+ boolean sqlFederationEnabled = sqlFederationRule.getConfiguration().isSqlFederationEnabled();
if (!sqlFederationEnabled || !(sqlStatementContext instanceof SelectStatementContext)) {
return false;
}