pvary commented on code in PR #14245:
URL: https://github.com/apache/iceberg/pull/14245#discussion_r2405261294


##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/data/FlinkParquetWriters.java:
##########
@@ -459,8 +460,9 @@ private TimestampNanoDataWriter(ColumnDescriptor desc) {
 
     @Override
     public void write(int repetitionLevel, TimestampData value) {
-      column.writeLong(
-          repetitionLevel, value.getMillisecond() * 1_000_000L + 
value.getNanoOfMillisecond());
+      // For nanosecond precision timestamps, convert to nanoseconds
+      long nanos = value.getMillisecond() * 1_000_000L + 
value.getNanoOfMillisecond();
+      column.writeLong(repetitionLevel, nanos);

Review Comment:
   Could we use the same pattern than the original write for the millisecond 
timestamp?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to