pacman82 opened a new issue, #2984:
URL: https://github.com/apache/arrow-rs/issues/2984

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   Parquet converted type is not set implicitly then logical type is set to 
timestamp.
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   Write a parquet file with a 64Bit Integer primitive array column and logical 
type timestamp of milliseconds. Inspecting the output reveals missing converted 
type. Code snippet declaring the primitive array with the erroneous behaviour:
   
   ```rust
   Type::primitive_type_builder(name, PhysicalType::INT64)
               .with_logical_type(Some(LogicalType::Timestamp {
                   is_adjusted_to_u_t_c: false,
                   unit: precision_to_time_unit(self.precision),
               }))
               .with_repetition(self.repetition)
               .build()
               .unwrap()
   ```
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   According to the documentation here the converted type is supposed to be 
populated automatically then setting the logical type. 
<https://docs.rs/parquet/latest/parquet/schema/types/struct.PrimitiveTypeBuilder.html#method.with_logical_type>
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   This problem occured in upstream `odbc2parquet` then users queried 
`DATETIME` columns from a Microsoft Database. If a consumer of the written 
parquet file relies on the converted type, it is empty. See this issue: 
<https://github.com/pacman82/odbc2parquet/issues/284>


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

Reply via email to