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 2022/07/31 14:35:23 UTC
[shardingsphere] branch master updated: Remove useless argument in ExecuteProcessStrategyEvaluator (#19727)
This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng 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 e9a932ff159 Remove useless argument in ExecuteProcessStrategyEvaluator (#19727)
e9a932ff159 is described below
commit e9a932ff159d3262db49813c98463ca6730f877f
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Jul 31 22:35:16 2022 +0800
Remove useless argument in ExecuteProcessStrategyEvaluator (#19727)
---
.../infra/executor/sql/process/ExecuteProcessEngine.java | 6 +++---
.../infra/executor/sql/process/ExecuteProcessStrategyEvaluator.java | 5 +----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
index 88fd93c70aa..f6023059a92 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
@@ -46,11 +46,11 @@ public final class ExecuteProcessEngine {
* @param props configuration properties
* @param eventBusContext event bus context
*/
- public static void initialize(final LogicSQL logicSQL, final ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext, final ConfigurationProperties props,
- final EventBusContext eventBusContext) {
+ public static void initialize(final LogicSQL logicSQL,
+ final ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext, final ConfigurationProperties props, final EventBusContext eventBusContext) {
SQLStatementContext<?> context = logicSQL.getSqlStatementContext();
Optional<ExecuteProcessReporter> reporter = ExecuteProcessReporterFactory.getInstance();
- if (reporter.isPresent() && ExecuteProcessStrategyEvaluator.evaluate(context, executionGroupContext, props)) {
+ if (reporter.isPresent() && ExecuteProcessStrategyEvaluator.evaluate(context, props)) {
ExecutorDataMap.getValue().put(ExecuteProcessConstants.EXECUTE_ID.name(), executionGroupContext.getExecutionID());
reporter.get().report(logicSQL, executionGroupContext, ExecuteProcessConstants.EXECUTE_STATUS_START, eventBusContext);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessStrategyEvaluator.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessStrategyEvaluator.java
index e30c53d6bb9..c70f4199e59 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessStrategyEvaluator.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessStrategyEvaluator.java
@@ -22,8 +22,6 @@ import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
-import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
-import org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.DMLStatement;
@@ -38,11 +36,10 @@ public final class ExecuteProcessStrategyEvaluator {
* Evaluate.
*
* @param context context
- * @param executionGroupContext execution group context
* @param props configuration properties
* @return submit or not
*/
- public static boolean evaluate(final SQLStatementContext<?> context, final ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext, final ConfigurationProperties props) {
+ public static boolean evaluate(final SQLStatementContext<?> context, final ConfigurationProperties props) {
boolean showProcessListEnabled = props.getValue(ConfigurationPropertyKey.SHOW_PROCESS_LIST_ENABLED);
SQLStatement statement = context.getSqlStatement();
boolean statementEnabled = statement instanceof DDLStatement || statement instanceof DMLStatement;