Skip to content

Commit ff39986

Browse files
joyCurry30lvyanquan
authored andcommitted
[cdc-common][pipeline-doris] Fix typo and wrong value for 'precision' of time type. (#2886)
(cherry picked from commit 055b0af)
1 parent 90e6cd0 commit ff39986

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

flink-cdc-common/src/main/java/com/ververica/cdc/common/types/utils/DataTypeUtils.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,21 @@ public static org.apache.flink.table.types.DataType toFlinkDataType(DataType typ
112112
case DATE:
113113
return org.apache.flink.table.api.DataTypes.DATE();
114114
case TIME_WITHOUT_TIME_ZONE:
115-
return org.apache.flink.table.api.DataTypes.TIME(length);
115+
return org.apache.flink.table.api.DataTypes.TIME(precision);
116116
case BIGINT:
117117
return org.apache.flink.table.api.DataTypes.BIGINT();
118118
case FLOAT:
119119
return org.apache.flink.table.api.DataTypes.FLOAT();
120120
case DOUBLE:
121121
return org.apache.flink.table.api.DataTypes.DOUBLE();
122122
case TIMESTAMP_WITHOUT_TIME_ZONE:
123-
return org.apache.flink.table.api.DataTypes.TIMESTAMP_WITH_TIME_ZONE(length);
124-
case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
125-
return org.apache.flink.table.api.DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE(length);
126123
case TIMESTAMP_WITH_TIME_ZONE:
127-
return org.apache.flink.table.api.DataTypes.TIMESTAMP_WITH_TIME_ZONE(length);
124+
return org.apache.flink.table.api.DataTypes.TIMESTAMP_WITH_TIME_ZONE(precision);
125+
case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
126+
return org.apache.flink.table.api.DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE(
127+
precision);
128128
case ARRAY:
129-
Preconditions.checkState(children != null && children.size() > 0);
129+
Preconditions.checkState(children != null && !children.isEmpty());
130130
return org.apache.flink.table.api.DataTypes.ARRAY(toFlinkDataType(children.get(0)));
131131
case MAP:
132132
Preconditions.checkState(children != null && children.size() > 1);

flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-doris/src/main/java/com/ververica/cdc/connectors/doris/sink/DorisMetadataApplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void applySchemaChange(SchemaChangeEvent event) {
7979
} else if (event instanceof RenameColumnEvent) {
8080
applyRenameColumnEvent((RenameColumnEvent) event);
8181
} else if (event instanceof AlterColumnTypeEvent) {
82-
throw new RuntimeException("Unsupport schema change event, " + event);
82+
throw new RuntimeException("Unsupported schema change event, " + event);
8383
}
8484
} catch (Exception ex) {
8585
throw new RuntimeException(

0 commit comments

Comments
 (0)