Skip to content

Commit 0f45837

Browse files
committed
lint
1 parent 6f11588 commit 0f45837

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

src/main/java/org/embulk/output/SnowflakeOutputPlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ protected BatchInsert newBatchInsert(PluginTask task, Optional<MergeConfig> merg
159159
this.stageIdentifier,
160160
false,
161161
pluginTask.getMaxUploadRetries(),
162-
pluginTask.getEmtpyFieldAsNull()
163-
);
162+
pluginTask.getEmtpyFieldAsNull());
164163
}
165164

166165
@Override

src/main/java/org/embulk/output/snowflake/SnowflakeCopyBatchInsert.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.util.*;
99
import java.util.concurrent.*;
1010
import java.util.zip.GZIPOutputStream;
11-
1211
import org.embulk.output.jdbc.BatchInsert;
1312
import org.embulk.output.jdbc.JdbcOutputConnector;
1413
import org.embulk.output.jdbc.JdbcSchema;
@@ -42,11 +41,11 @@ public class SnowflakeCopyBatchInsert implements BatchInsert {
4241
private boolean emptyFieldAsNull;
4342

4443
public SnowflakeCopyBatchInsert(
45-
JdbcOutputConnector connector,
46-
StageIdentifier stageIdentifier,
47-
boolean deleteStageFile,
48-
int maxUploadRetries,
49-
boolean emptyFieldAsNull)
44+
JdbcOutputConnector connector,
45+
StageIdentifier stageIdentifier,
46+
boolean deleteStageFile,
47+
int maxUploadRetries,
48+
boolean emptyFieldAsNull)
5049
throws IOException {
5150
this.index = 0;
5251
openNewFile();
@@ -399,7 +398,8 @@ private class CopyTask implements Callable<Void> {
399398
private final String snowflakeStageFileName;
400399
private final boolean emptyFieldAsNull;
401400

402-
public CopyTask(Future<Void> uploadFuture, String snowflakeStageFileName, boolean emptyFieldAsNull) {
401+
public CopyTask(
402+
Future<Void> uploadFuture, String snowflakeStageFileName, boolean emptyFieldAsNull) {
403403
this.uploadFuture = uploadFuture;
404404
this.snowflakeStageFileName = snowflakeStageFileName;
405405
this.emptyFieldAsNull = emptyFieldAsNull;
@@ -414,7 +414,12 @@ public Void call() throws SQLException, InterruptedException, ExecutionException
414414
logger.info("Running COPY from file {}", snowflakeStageFileName);
415415

416416
long startTime = System.currentTimeMillis();
417-
con.runCopy(tableIdentifier, stageIdentifier, snowflakeStageFileName, delimiterString, emptyFieldAsNull);
417+
con.runCopy(
418+
tableIdentifier,
419+
stageIdentifier,
420+
snowflakeStageFileName,
421+
delimiterString,
422+
emptyFieldAsNull);
418423

419424
double seconds = (System.currentTimeMillis() - startTime) / 1000.0;
420425

src/main/java/org/embulk/output/snowflake/SnowflakeOutputConnection.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public void runCopy(
2121
String delimiterString,
2222
boolean emptyFieldAsNull)
2323
throws SQLException {
24-
String sql = buildCopySQL(tableIdentifier, stageIdentifier, filename, delimiterString, emptyFieldAsNull);
24+
String sql =
25+
buildCopySQL(tableIdentifier, stageIdentifier, filename, delimiterString, emptyFieldAsNull);
2526
runUpdate(sql);
2627
}
2728

@@ -114,7 +115,7 @@ protected String buildCopySQL(
114115
sb.append(" FILE_FORMAT = ( TYPE = CSV FIELD_DELIMITER = '");
115116
sb.append(delimiterString);
116117
sb.append("') ");
117-
if (!emptyFieldAsNull){
118+
if (!emptyFieldAsNull) {
118119
sb.append("EMPTY_FIELD_AS_NULL = FALSE");
119120
}
120121
sb.append(";");

0 commit comments

Comments
 (0)