klion26 commented on issue #8055:
URL: https://github.com/apache/arrow-rs/issues/8055#issuecomment-3174232839

   @alamb From the [iceberg 
implementation](https://github.com/apache/iceberg/pull/12682) and the [parquet 
testing pr](https://github.com/apache/parquet-testing/pull/90), the `TimeNTZ` 
will store a `long` in the file.
   
   <details>
   <summary> iceberg time read logic sample code</summary>
   ....
   case TIME:  
   case TIMESTAMPTZ_NANOS:  
   case TIMESTAMPNTZ_NANOS:  
     return VariantUtil.readLittleEndianInt64(value, PRIMITIVE_OFFSET);
   
   ....
   static long readLittleEndianInt64(ByteBuffer buffer, int offset) {  
     return buffer.getLong(buffer.position() + offset);  
   }
   
   </details>
   
   When decoding, we can read from the file with `u64` and parse it to 
`NaiveTime`, and write the `u64` back to file when serializing.
   
   But, currently, there is no test file in 
`parquet-testing`(`primitive_time.metadata`  and `primitive_time.value`). I'm 
playing with the iceberg code to generate the test file, and will file a pr to 
support `TimeNTZ` when the testing files are ok.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to