File tree 1 file changed +2
-1
lines changed
plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/util
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 29
29
import io .trino .spi .type .LongTimestamp ;
30
30
import io .trino .spi .type .LongTimestampWithTimeZone ;
31
31
import io .trino .spi .type .RowType ;
32
+ import io .trino .spi .type .SqlDate ;
32
33
import io .trino .spi .type .Type ;
33
34
import io .trino .spi .type .VarbinaryType ;
34
35
import io .trino .spi .type .VarcharType ;
@@ -162,7 +163,7 @@ else if (type instanceof DecimalType decimalType) {
162
163
type .writeLong (output , encodeShortScaledValue (decimal , decimalType .getScale ()));
163
164
}
164
165
else if (type .equals (DATE )) {
165
- type .writeLong (output , ((Number ) value ).intValue ());
166
+ type .writeLong (output , ((SqlDate ) value ).getDays ());
166
167
}
167
168
else if (type .equals (TIMESTAMP_MICROS )) {
168
169
type .writeLong (output , toTrinoTimestamp (((Utf8 ) value ).toString ()));
You can’t perform that action at this time.
0 commit comments