You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Hisoka-X (via GitHub)" <gi...@apache.org> on 2025/06/04 02:19:48 UTC
Re: [PR] [Fix][Connector-V2] ArrowToSeatunnelRowReader convertSeatunnelRowValue add handle Second TIMESTAMP type [seatunnel]
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org