Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
leechor authored and github-actions[bot] committed Jan 30, 2024
1 parent b060ce0 commit 0dac17a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,11 @@ public Task initDefaultFlinkSQLEnv(Integer tenantId) {
+ "'password' = '%s',\n"
+ " 'url' = '%s'\n"
+ ")%suse catalog my_catalog%s",
dsProperties.getUsername(), dsProperties.getPassword(), dsProperties.getUrl(), FlinkSQLConstant.SEPARATOR, FlinkSQLConstant.SEPARATOR);
dsProperties.getUsername(),
dsProperties.getPassword(),
dsProperties.getUrl(),
FlinkSQLConstant.SEPARATOR,
FlinkSQLConstant.SEPARATOR);

if (null != defaultFlinkSQLEnvTask) {
defaultFlinkSQLEnvTask.setStatement(sql);
Expand Down
1 change: 1 addition & 0 deletions dinky-common/src/main/java/org/dinky/utils/SqlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class SqlUtil {

private static final String SEMICOLON = ";";
private static final String SQL_SEPARATOR = ";\\s*(?:\\n|--.*)";

private SqlUtil() {}

public static String[] getStatements(String sql) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

package org.dinky.constant;

import org.dinky.data.model.SystemConfiguration;

/**
* FlinkSQLConstant
*
Expand Down
5 changes: 1 addition & 4 deletions dinky-core/src/main/java/org/dinky/explainer/Explainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
package org.dinky.explainer;

import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkSQLConstant;
import org.dinky.data.model.LineageRel;
import org.dinky.data.model.SystemConfiguration;
import org.dinky.data.result.ExplainResult;
import org.dinky.data.result.SqlExplainResult;
import org.dinky.executor.CustomTableEnvironment;
Expand Down Expand Up @@ -86,8 +84,7 @@ public Explainer(Executor executor, boolean useStatementSet, JobManager jobManag
this.jobManager = jobManager;
}

public static Explainer build(
Executor executor, boolean useStatementSet, JobManager jobManager) {
public static Explainer build(Executor executor, boolean useStatementSet, JobManager jobManager) {
return new Explainer(executor, useStatementSet, jobManager);
}

Expand Down
1 change: 0 additions & 1 deletion dinky-core/src/main/java/org/dinky/job/JobBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.dinky.job;

import org.dinky.constant.FlinkSQLConstant;
import org.dinky.executor.Executor;
import org.dinky.gateway.enums.GatewayType;

Expand Down
5 changes: 2 additions & 3 deletions dinky-core/src/main/java/org/dinky/job/JobManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.dinky.api.FlinkAPI;
import org.dinky.assertion.Asserts;
import org.dinky.classloader.DinkyClassLoader;
import org.dinky.constant.FlinkSQLConstant;
import org.dinky.context.CustomTableEnvironmentContext;
import org.dinky.context.FlinkUdfPathContextHolder;
import org.dinky.context.RowLevelPermissionsContext;
Expand Down Expand Up @@ -327,8 +326,8 @@ public JobResult executeSql(String statement) throws Exception {
ready();

DinkyClassLoaderUtil.initClassLoader(config, getDinkyClassLoader());
jobParam = Explainer.build(executor, useStatementSet, this)
.pretreatStatements(SqlUtil.getStatements(statement));
jobParam =
Explainer.build(executor, useStatementSet, this).pretreatStatements(SqlUtil.getStatements(statement));
try {
// step 1: init udf
JobUDFBuilder.build(this).run();
Expand Down

0 comments on commit 0dac17a

Please sign in to comment.