Hisoka-X commented on code in PR #9393:
URL: https://github.com/apache/seatunnel/pull/9393#discussion_r2125332383
##########
seatunnel-connectors-v2/connector-common/src/main/java/org/apache/seatunnel/connectors/seatunnel/common/source/arrow/reader/ArrowToSeatunnelRowReader.java:
##########
@@ -204,9 +204,16 @@ private Object convertSeatunnelRowValue(
}
case TIMESTAMP:
if (fieldValue instanceof Long) {
- return Instant.ofEpochMilli((Long) fieldValue)
- .atZone(ZoneId.systemDefault())
- .toLocalDateTime();
+ // this TIMESTAMP value may be SECOND not milliseconds
+ if (((Long) fieldValue).toString().length() == 10) {
Review Comment:
We should get the precision from the type rather than judging directly by
the size of the value, which may be wrong.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]