Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[debezium] Upgrade to Debezium 1.9.8.Final #3034

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

import static com.ververica.cdc.connectors.mysql.utils.MySqlTypeUtils.fromDbzColumn;

/** Copied from {@link AlterTableParserListener} in Debezium 1.9.7.Final. */
/** Copied from {@link AlterTableParserListener} in Debezium 1.9.8.Final. */
public class CustomAlterTableParserListener extends MySqlParserBaseListener {

private static final int STARTING_INDEX = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import java.util.concurrent.CopyOnWriteArrayList;

/**
* Copied from {@link MySqlAntlrDdlParserListener} in Debezium 1.9.7.final.
* Copied from {@link MySqlAntlrDdlParserListener} in Debezium 1.9.8.final.
*
* <p>This listener's constructor will use some modified listener.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.Optional;

/**
* Copied from Debezium 1.9.7.Final.
* Copied from Debezium 1.9.8.Final.
*
* <p>Base class for {@link ChangeRecordEmitter} implementations based on a relational database.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import java.util.Properties;

/**
* Copied from Debezium project(1.9.7.final) to add custom jdbc properties in the jdbc url. The new
* Copied from Debezium project(1.9.8.final) to add custom jdbc properties in the jdbc url. The new
* parameter {@code jdbcProperties} in the constructor of {@link MySqlConnectionConfiguration} will
* be used to generate the jdbc url pattern, and may overwrite the default value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import java.util.regex.Pattern;

/**
* Copied from Debezium project(1.9.7.final) to add BIGINT and SMALLINT to TRIM_DATA_TYPES. Remove
* this when https://issues.redhat.com/browse/DBZ-6824 is fixed.
* Copied from Debezium project(1.9.8.final) to add BIGINT and SMALLINT to TRIM_DATA_TYPES. Remove
* this until https://issues.redhat.com/browse/DBZ-6824 is fixed in 2.3.3.Final.
*
* <p>Line 81 & 82: add BIGINT and SMALLINT to TRIM_DATA_TYPES.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
import static io.debezium.util.Strings.isNullOrEmpty;

/**
* Copied from Debezium project to fix
* Copied from Debezium project(1.9.8.Final) to fix
* https://github.com/ververica/flink-cdc-connectors/issues/1944.
*
* <p>Line 1427-1433 : Adjust GTID merging logic to support recovering from job which previously
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
import java.util.regex.Pattern;

/**
* Copied from Debezium project to fix FLOAT converted to FLOAT64 type issue. See DBZ-3865,
* DBZ-5843. Remove it when debezium version is upgraded above 2.0.0.Final.
* Copied from Debezium project(1.9.8.Final) to fix FLOAT converted to FLOAT64 type issue. See
* DBZ-3865, DBZ-5843. Remove it when debezium version is upgraded above 2.0.0.Final.
*
* <p>Line 240 & 246: add FLOAT type adjustment.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import java.util.concurrent.atomic.AtomicReference;

/**
* Copied from Debezium project(v1.9.7.Final) to fix
* Copied from Debezium project(v1.9.8.Final) to fix
* https://github.com/ververica/flink-cdc-connectors/issues/1506.
*
* <p>Line 48~59: use the actual default string value when the sql contains COLLATE. We should
* remove this class after we bumped a higher debezium version where the
* remove this class after we bumped debezium 2.0 where the
* https://issues.redhat.com/browse/DBZ-5587 has been fixed.
*/
public class DefaultValueParserListener extends MySqlParserBaseListener {
Expand Down Expand Up @@ -95,7 +95,10 @@ public void exitDefaultValue(boolean skipIfUnknownOptional) {
}

private String unquote(String stringLiteral) {
return stringLiteral.substring(1, stringLiteral.length() - 1);
if (stringLiteral != null && stringLiteral.startsWith("'") && stringLiteral.endsWith("'")) {
return stringLiteral.substring(1, stringLiteral.length() - 1);
}
return stringLiteral;
}

private String unquoteBinary(String stringLiteral) {
Expand Down
Loading
Loading