diff --git a/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/postgres/PostgresRecordParser.java b/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/postgres/PostgresRecordParser.java index 55c3538419c0..07156823b367 100644 --- a/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/postgres/PostgresRecordParser.java +++ b/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/postgres/PostgresRecordParser.java @@ -191,7 +191,7 @@ private DataType extractFieldType(DebeziumEvent.Field field) { if (StringUtils.isNullOrWhitespaceOnly(stringifyLength)) { return DataTypes.BOOLEAN(); } - Integer length = Integer.valueOf(stringifyLength); + int length = Integer.parseInt(stringifyLength); if (length == 1) { return DataTypes.BOOLEAN(); } else { @@ -295,7 +295,6 @@ else if (Date.SCHEMA_NAME.equals(className)) { newValue = DateTimeUtils.toLocalDate(Integer.parseInt(oldValue)).toString(); } else if (Timestamp.SCHEMA_NAME.equals(className)) { // timestamp (precision 0-3) - LocalDateTime localDateTime = DateTimeUtils.toLocalDateTime(Long.parseLong(oldValue), ZoneOffset.UTC); newValue = DateTimeUtils.formatLocalDateTime(localDateTime, 3); @@ -314,7 +313,6 @@ else if (Date.SCHEMA_NAME.equals(className)) { newValue = DateTimeUtils.formatLocalDateTime(localDateTime, 6); } else if (ZonedTimestamp.SCHEMA_NAME.equals(className)) { // timestamptz - LocalDateTime localDateTime = Instant.parse(oldValue).atZone(serverTimeZone).toLocalDateTime(); newValue = DateTimeUtils.formatLocalDateTime(localDateTime, 6);