Skip to content

Commit

Permalink
[Fix] fix time type convert (DataLinkDC#3348)
Browse files Browse the repository at this point in the history
Co-authored-by: Zzm0809 <[email protected]>
  • Loading branch information
Zzm0809 and Zzm0809 authored Apr 2, 2024
1 parent 43c3a55 commit 66ae4f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.apache.flink.table.types.logical.IntType;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.SmallIntType;
import org.apache.flink.table.types.logical.TimeType;
import org.apache.flink.table.types.logical.TimestampType;
import org.apache.flink.table.types.logical.TinyIntType;
import org.apache.flink.table.types.logical.VarBinaryType;
Expand Down Expand Up @@ -335,6 +336,9 @@ public LogicalType getLogicalType(Column column) {
case INT:
case INTEGER:
return new IntType();
case TIME:
case LOCALTIME:
return new TimeType(column.isNullable(), column.getPrecision() == null ? 0 : column.getPrecision());
case DATE:
case LOCAL_DATE:
return new DateType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public OracleTypeConvert() {
this.convertMap.clear();
register("char", ColumnType.STRING);
register("date", ColumnType.LOCAL_DATETIME);
register("time", ColumnType.TIME);
register("timestamp", ColumnType.TIMESTAMP);
register("number", OracleTypeConvert::convertNumber);
register("float", ColumnType.JAVA_LANG_FLOAT);
Expand Down

0 comments on commit 66ae4f2

Please sign in to comment.