From 65f6a0586f879f1f4b37498ece556092a438045d Mon Sep 17 00:00:00 2001 From: revi cheng Date: Wed, 1 Nov 2023 14:43:25 -0700 Subject: [PATCH] autoformatting --- .../internal/SnowflakeConnectionServiceV1.java | 3 ++- .../streaming/TopicPartitionChannelIT.java | 14 +++++++------- .../streaming/TopicPartitionChannelTest.java | 2 -- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceV1.java b/src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceV1.java index cd5e5184e..8457c31d3 100644 --- a/src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceV1.java +++ b/src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceV1.java @@ -488,7 +488,8 @@ public boolean hasSchemaEvolutionPermission(String tableName, String role) { public void appendColumnsToTable(String tableName, Map columnToType) { checkConnection(); InternalUtils.assertNotEmpty("tableName", tableName); - StringBuilder appendColumnQuery = new StringBuilder("alter table identifier(?) add column if not exists "); + StringBuilder appendColumnQuery = + new StringBuilder("alter table identifier(?) add column if not exists "); boolean first = true; StringBuilder logColumn = new StringBuilder("["); for (String columnName : columnToType.keySet()) { diff --git a/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelIT.java b/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelIT.java index 48c639cb0..7cad92deb 100644 --- a/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelIT.java +++ b/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelIT.java @@ -20,11 +20,11 @@ import org.apache.kafka.common.TopicPartition; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaAndValue; +import org.apache.kafka.connect.json.JsonConverter; import org.apache.kafka.connect.sink.SinkRecord; import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.apache.kafka.connect.json.JsonConverter; import org.junit.Test; public class TopicPartitionChannelIT { @@ -489,8 +489,8 @@ public void testSimpleInsertRowsFailureWithArrowBDECFormat() throws Exception { service.closeAll(); } - - // Sometimes the customers converter will send a NULL record which is dropped by KC, resulting in missing offsets + // Sometimes the customers converter will send a NULL record which is dropped by KC, resulting in + // missing offsets @Test public void testMissingOffsetRecordIngestionWithSchematization() throws Exception { // setup @@ -512,9 +512,7 @@ public void testMissingOffsetRecordIngestionWithSchematization() throws Exceptio HashMap converterConfig = new HashMap<>(); converterConfig.put("schemas.enable", "false"); converter.configure(converterConfig, false); - SchemaAndValue schemaInputValue = - converter.toConnectData( - "test", null); + SchemaAndValue schemaInputValue = converter.toConnectData("test", null); service.insert( new SinkRecord( topic, @@ -547,7 +545,9 @@ public void testMissingOffsetRecordIngestionWithSchematization() throws Exceptio // verify offset and table size TestUtils.assertWithRetry( () -> service.getOffset(new TopicPartition(topic, PARTITION)) == expectedOffset, 20, 5); - assert expectedNumRecords == TestUtils.tableSize(testTableName) : Utils.formatString("expected: {}, actual: {}", expectedNumRecords, TestUtils.tableSize(testTableName)); + assert expectedNumRecords == TestUtils.tableSize(testTableName) + : Utils.formatString( + "expected: {}, actual: {}", expectedNumRecords, TestUtils.tableSize(testTableName)); service.closeAll(); } } diff --git a/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelTest.java b/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelTest.java index 20d8e90af..601fb5922 100644 --- a/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelTest.java +++ b/src/test/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelTest.java @@ -965,6 +965,4 @@ public void testTopicPartitionChannelInvalidJmxReporter() throws Exception { topicPartitionChannel.closeChannel(); assert resultStatus.getMetricsJmxReporter() == null; } - - }