Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
DBZ-7920 Rename ZonedTimestampType to DebeziumZonedTimestampType
Browse files Browse the repository at this point in the history
  • Loading branch information
mfvitale committed Jul 9, 2024
1 parent a64b2c6 commit 185033f
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
import io.debezium.connector.jdbc.type.connect.ConnectTimeType;
import io.debezium.connector.jdbc.type.connect.ConnectTimestampType;
import io.debezium.connector.jdbc.type.debezium.DateType;
import io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType;
import io.debezium.connector.jdbc.type.debezium.MicroTimeType;
import io.debezium.connector.jdbc.type.debezium.MicroTimestampType;
import io.debezium.connector.jdbc.type.debezium.NanoTimeType;
Expand All @@ -77,7 +78,6 @@
import io.debezium.connector.jdbc.type.debezium.TimestampType;
import io.debezium.connector.jdbc.type.debezium.VariableScaleDecimalType;
import io.debezium.connector.jdbc.type.debezium.ZonedTimeType;
import io.debezium.connector.jdbc.type.debezium.ZonedTimestampType;
import io.debezium.util.Strings;

/**
Expand Down Expand Up @@ -636,7 +636,7 @@ protected void registerTypes() {
registerType(NanoTimeType.INSTANCE);
registerType(NanoTimestampType.INSTANCE);
registerType(ZonedTimeType.INSTANCE);
registerType(ZonedTimestampType.INSTANCE);
registerType(DebeziumZonedTimestampType.INSTANCE);
registerType(VariableScaleDecimalType.INSTANCE);

// Supported connect data types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

import io.debezium.connector.jdbc.ValueBindDescriptor;
import io.debezium.connector.jdbc.type.Type;
import io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType;
import io.debezium.time.ZonedTimestamp;

/**
* An implementation of {@link Type} for {@link ZonedTimestamp} values.
*
* @author Chris Cranford
*/
public class ZonedTimestampType extends io.debezium.connector.jdbc.type.debezium.ZonedTimestampType {
public class ZonedTimestampType extends DebeziumZonedTimestampType {

public static final ZonedTimestampType INSTANCE = new ZonedTimestampType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import java.sql.Types;

import io.debezium.connector.jdbc.type.Type;
import io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType;
import io.debezium.time.ZonedTimestamp;

/**
* An implementation of {@link Type} for {@link ZonedTimestamp} values.
*
* @author Chris Cranford
*/
public class ZonedTimestampType extends io.debezium.connector.jdbc.type.debezium.ZonedTimestampType {
public class ZonedTimestampType extends DebeziumZonedTimestampType {

public static final ZonedTimestampType INSTANCE = new ZonedTimestampType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

import io.debezium.connector.jdbc.ValueBindDescriptor;
import io.debezium.connector.jdbc.type.Type;
import io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType;
import io.debezium.time.ZonedTimestamp;

/**
* An implementation of {@link Type} for {@link ZonedTimestamp} values.
*
* @author Chris Cranford
*/
public class ZonedTimestampType extends io.debezium.connector.jdbc.type.debezium.ZonedTimestampType {
public class ZonedTimestampType extends DebeziumZonedTimestampType {

public static final ZonedTimestampType INSTANCE = new ZonedTimestampType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
package io.debezium.connector.jdbc.dialect.postgres;

import static io.debezium.connector.jdbc.type.debezium.ZonedTimestampType.NEGATIVE_INFINITY;
import static io.debezium.connector.jdbc.type.debezium.ZonedTimestampType.POSITIVE_INFINITY;
import static io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType.NEGATIVE_INFINITY;
import static io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType.POSITIVE_INFINITY;

import java.sql.Connection;
import java.sql.SQLException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
import io.debezium.connector.jdbc.ValueBindDescriptor;
import io.debezium.connector.jdbc.relational.ColumnDescriptor;
import io.debezium.connector.jdbc.type.Type;
import io.debezium.connector.jdbc.type.debezium.DebeziumZonedTimestampType;
import io.debezium.time.ZonedTimestamp;

/**
* An implementation of {@link Type} for {@link ZonedTimestamp} values specific to PostgreSQL.
*
* @author Mario Fiore Vitale
*/
public class ZonedTimestampType extends io.debezium.connector.jdbc.type.debezium.ZonedTimestampType {
public class ZonedTimestampType extends DebeziumZonedTimestampType {

public static final ZonedTimestampType INSTANCE = new ZonedTimestampType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*
* @author Chris Cranford
*/
public class ZonedTimestampType extends AbstractTimestampType {
public class DebeziumZonedTimestampType extends AbstractTimestampType {

public static final ZonedTimestampType INSTANCE = new ZonedTimestampType();
public static final DebeziumZonedTimestampType INSTANCE = new DebeziumZonedTimestampType();
public static final String POSITIVE_INFINITY = "infinity";
public static final String NEGATIVE_INFINITY = "-infinity";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.kafka.connect.sink.SinkRecord;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -2590,7 +2589,7 @@ public void testTimestampWithTimeZoneDataTypeWithInfinityValue(Source source, Si
(rs, index) -> rs.getTimestamp(index).toInstant().atZone(ZoneOffset.UTC));
}

private static @NotNull List<ZonedDateTime> getExpectedZonedDateTimes(Sink sink) {
private static List<ZonedDateTime> getExpectedZonedDateTimes(Sink sink) {

List<ZonedDateTime> expectedValues = List.of();
if (sink.getType().is(SinkType.SQLSERVER) && sink.getType().is(SinkType.DB2)) {
Expand Down

0 comments on commit 185033f

Please sign in to comment.