Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
edgao committed Jan 29, 2024
1 parent 08729b0 commit b846503
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import static io.airbyte.cdk.integrations.base.JavaBaseConstants.COLUMN_NAME_EMITTED_AT;
import static io.airbyte.integrations.base.destination.typing_deduping.Sql.transactionally;
import static java.util.stream.Collectors.toList;
import static org.jooq.impl.DSL.alterTable;
import static org.jooq.impl.DSL.asterisk;
import static org.jooq.impl.DSL.cast;
import static org.jooq.impl.DSL.dropTableIfExists;
Expand Down Expand Up @@ -57,8 +56,6 @@
import org.jooq.DSLContext;
import org.jooq.DataType;
import org.jooq.Field;
import org.jooq.InsertOnDuplicateStep;
import org.jooq.InsertReturningStep;
import org.jooq.InsertValuesStepN;
import org.jooq.Name;
import org.jooq.Record;
Expand Down Expand Up @@ -383,15 +380,15 @@ private Sql insertAndDeleteTransaction(final StreamConfig streamConfig,
.from(filteredRows)
.where(field(name(ROW_NUMBER_COLUMN_NAME), Integer.class).eq(1)) // Can refer by CTE.field but no use since we don't strongly type
// them.
).getSQL(ParamType.INLINED);
).getSQL(ParamType.INLINED);

// Used for append and overwrite modes.
final String insertStmt =
insertIntoFinalTable(finalSchema, finalTable, streamConfig.columns(), getFinalTableMetaColumns(true))
.select(with(rawTableRowsWithCast)
.select(finalTableFields)
.from(rawTableRowsWithCast)
).getSQL(ParamType.INLINED);
.from(rawTableRowsWithCast))
.getSQL(ParamType.INLINED);
final String deleteStmt = deleteFromFinalTable(finalSchema, finalTable, streamConfig.primaryKey(), streamConfig.cursor());
final String deleteCdcDeletesStmt =
streamConfig.columns().containsKey(cdcDeletedAtColumn) ? deleteFromFinalTableCdcDeletes(finalSchema, finalTable) : "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import io.airbyte.protocol.models.v0.DestinationSyncMode;
import io.airbyte.protocol.models.v0.StreamDescriptor;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package io.airbyte.integrations.base.destination.typing_deduping;

import java.time.Instant;
import java.util.List;
import java.util.Optional;

public interface DestinationHandler<DialectTableDefinition> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package io.airbyte.integrations.base.destination.typing_deduping;

import java.time.Instant;
import java.util.List;
import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down

0 comments on commit b846503

Please sign in to comment.