Skip to content

Commit

Permalink
Merge branch 'master' into hotfix_1825
Browse files Browse the repository at this point in the history
  • Loading branch information
ll076110 authored Sep 21, 2023
2 parents 942f68a + 49c6873 commit 1630ec3
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,17 @@ protected IDeserializationConverter createInternalConverter(LogicalType type) {
new BigDecimal((BigInteger) val, 0), precision, scale)
: DecimalData.fromBigDecimal((BigDecimal) val, precision, scale);
case DATE:
return val -> Long.valueOf(((Timestamp) val).getTime() / 1000).intValue();
return val ->
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 1630ec3

Please sign in to comment.