ConeyLiu commented on PR #7836:
URL: https://github.com/apache/iceberg/pull/7836#issuecomment-1603762841

   > which always loses precision after storing the physical long value to 
iceberg?
   
   The write will convert the TimeStamp to long which should not lose the 
precision.
   ```java
     private static class TimestampDataWriter
         extends ParquetValueWriters.PrimitiveWriter<TimestampData> {
       private TimestampDataWriter(ColumnDescriptor desc) {
         super(desc);
       }
   
       @Override
       public void write(int repetitionLevel, TimestampData value) {
         column.writeLong(
             repetitionLevel, value.getMillisecond() * 1000 + 
value.getNanoOfMillisecond() / 1000);
       }
     }
   ```


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