From 52eb61de163fcb090a56cf73ea072ddfdcc82f8a Mon Sep 17 00:00:00 2001 From: octavia-squidington-iii Date: Wed, 21 Jun 2023 15:21:12 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Auto=20format=20source-postgres?= =?UTF-8?q?=20code=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connectors/source-postgres/build.gradle | 1 + .../postgres/ctid/AirbyteMessageWithCtid.java | 8 +++--- .../postgres/xmin/XminCtidUtilsTest.java | 27 ++++++++++--------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/airbyte-integrations/connectors/source-postgres/build.gradle b/airbyte-integrations/connectors/source-postgres/build.gradle index ca362e246613..a28e207887e3 100644 --- a/airbyte-integrations/connectors/source-postgres/build.gradle +++ b/airbyte-integrations/connectors/source-postgres/build.gradle @@ -57,3 +57,4 @@ jsonSchema2Pojo { includeSetters = true } + diff --git a/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/ctid/AirbyteMessageWithCtid.java b/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/ctid/AirbyteMessageWithCtid.java index 3e9d16a5f503..cbadc1af7044 100644 --- a/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/ctid/AirbyteMessageWithCtid.java +++ b/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/ctid/AirbyteMessageWithCtid.java @@ -7,10 +7,10 @@ import io.airbyte.protocol.models.v0.AirbyteMessage; /** - * ctid of rows is queried as part of our sync and is used to checkpoint - * to be able to restart failed sync from a known last point. - * Since we never want to emit a ctid it is kept in a different field, - * to save us an expensive JsonNode.remove() operation. + * ctid of rows is queried as part of our sync and is used to checkpoint to be able to restart + * failed sync from a known last point. Since we never want to emit a ctid it is kept in a different + * field, to save us an expensive JsonNode.remove() operation. + * * @param recordMessage row fields to emit * @param ctid ctid */ diff --git a/airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/xmin/XminCtidUtilsTest.java b/airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/xmin/XminCtidUtilsTest.java index 24f2fabebe0a..6e34678023e3 100644 --- a/airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/xmin/XminCtidUtilsTest.java +++ b/airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/xmin/XminCtidUtilsTest.java @@ -1,5 +1,8 @@ -package io.airbyte.integrations.source.postgres.xmin; +/* + * Copyright (c) 2023 Airbyte, Inc., all rights reserved. + */ +package io.airbyte.integrations.source.postgres.xmin; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -13,9 +16,9 @@ import io.airbyte.integrations.source.postgres.internal.models.XminStatus; import io.airbyte.integrations.source.postgres.xmin.XminCtidUtils.StreamsCategorised; import io.airbyte.integrations.source.relationaldb.state.StreamStateManager; -import io.airbyte.protocol.models.v0.AirbyteStateMessage; import io.airbyte.protocol.models.Field; import io.airbyte.protocol.models.JsonSchemaType; +import io.airbyte.protocol.models.v0.AirbyteStateMessage; import io.airbyte.protocol.models.v0.AirbyteStateMessage.AirbyteStateType; import io.airbyte.protocol.models.v0.AirbyteStreamState; import io.airbyte.protocol.models.v0.CatalogHelpers; @@ -31,20 +34,20 @@ public class XminCtidUtilsTest { private static final ConfiguredAirbyteStream MODELS_STREAM = CatalogHelpers.toDefaultConfiguredStream(CatalogHelpers.createAirbyteStream( - "MODELS_STREAM_NAME", - "MODELS_SCHEMA", - Field.of("COL_ID", JsonSchemaType.INTEGER), - Field.of("COL_MAKE_ID", JsonSchemaType.INTEGER), - Field.of("COL_MODEL", JsonSchemaType.STRING)) + "MODELS_STREAM_NAME", + "MODELS_SCHEMA", + Field.of("COL_ID", JsonSchemaType.INTEGER), + Field.of("COL_MAKE_ID", JsonSchemaType.INTEGER), + Field.of("COL_MODEL", JsonSchemaType.STRING)) .withSupportedSyncModes(Lists.newArrayList(SyncMode.FULL_REFRESH, SyncMode.INCREMENTAL)) .withSourceDefinedPrimaryKey(List.of(List.of("COL_ID")))); private static final ConfiguredAirbyteStream MODELS_STREAM_2 = CatalogHelpers.toDefaultConfiguredStream(CatalogHelpers.createAirbyteStream( - "MODELS_STREAM_NAME_2", - "MODELS_SCHEMA", - Field.of("COL_ID", JsonSchemaType.INTEGER), - Field.of("COL_MAKE_ID", JsonSchemaType.INTEGER), - Field.of("COL_MODEL", JsonSchemaType.STRING)) + "MODELS_STREAM_NAME_2", + "MODELS_SCHEMA", + Field.of("COL_ID", JsonSchemaType.INTEGER), + Field.of("COL_MAKE_ID", JsonSchemaType.INTEGER), + Field.of("COL_MODEL", JsonSchemaType.STRING)) .withSupportedSyncModes(Lists.newArrayList(SyncMode.FULL_REFRESH, SyncMode.INCREMENTAL)) .withSourceDefinedPrimaryKey(List.of(List.of("COL_ID"))));