Skip to content

Commit

Permalink
[Improve][CDC] Set temporalAdjuster at defaultValue process
Browse files Browse the repository at this point in the history
  • Loading branch information
dailai committed Apr 25, 2024
1 parent a6941ec commit f16ca51
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public static org.apache.seatunnel.api.table.catalog.Column convertToSeaTunnelCo
dbzConnectorConfig
.getConfig()
.getString(MySqlConnectorConfig.BIGINT_UNSIGNED_HANDLING_MODE);
final boolean timeAdjusterEnabled =
dbzConnectorConfig
.getConfig()
.getBoolean(MySqlConnectorConfig.ENABLE_TIME_ADJUSTER);
MySqlConnectorConfig.BigIntUnsignedHandlingMode bigIntUnsignedHandlingMode =
MySqlConnectorConfig.BigIntUnsignedHandlingMode.parse(
bigIntUnsignedHandlingModeStr);
Expand All @@ -53,7 +57,9 @@ public static org.apache.seatunnel.api.table.catalog.Column convertToSeaTunnelCo
dbzConnectorConfig.getDecimalMode(),
dbzConnectorConfig.getTemporalPrecisionMode(),
bigIntUnsignedHandlingMode.asBigIntUnsignedMode(),
dbzConnectorConfig.binaryHandlingMode());
dbzConnectorConfig.binaryHandlingMode(),
timeAdjusterEnabled ? MySqlValueConverters::adjustTemporal : (x) -> x,
MySqlValueConverters::defaultParsingErrorHandler);
MySqlDefaultValueConverter mySqlDefaultValueConverter =
new MySqlDefaultValueConverter(mySqlValueConverters);
Object defaultValue =
Expand Down

0 comments on commit f16ca51

Please sign in to comment.