Skip to content

Commit

Permalink
[hotfix-#1765][chunjun-connector-jdbc-base] failed to consume oracle …
Browse files Browse the repository at this point in the history
…date type data
  • Loading branch information
gaoliang committed Jul 19, 2023
1 parent a05900e commit f748332
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,16 @@ protected IDeserializationConverter createInternalConverter(RowType.RowField row
: DecimalData.fromBigDecimal((BigDecimal) val, precision, scale);
case DATE:
return val ->
(int) ((Date.valueOf(String.valueOf(val))).toLocalDate().toEpochDay());
val instanceof Timestamp
? (int)
(((Timestamp) val)
.toLocalDateTime()
.toLocalDate()
.toEpochDay())
: (int)
((Date.valueOf(String.valueOf(val)))
.toLocalDate()
.toEpochDay());
case TIME_WITHOUT_TIME_ZONE:
return val ->
(int)
Expand Down

0 comments on commit f748332

Please sign in to comment.