Anurag-S1ngh opened a new pull request, #41664:
URL: https://github.com/apache/beam/pull/41664

   ## Summary
   
   Adds support for the portable `SqlTypes.TIME` logical type to the Avro 
schema conversion. `TIME` fields map to Avro `time-micros`, and `LocalTime` 
values convert to microseconds since midnight.
   
   Previously, writing a Beam SQL Parquet table with a `TIME` column failed 
with `Unhandled logical type beam:logical_type:time:v1`.
   
   ## Changes
   
   - Map `SqlTypes.TIME` to Avro `time-micros` in `AvroUtils.getFieldSchema`
   - Convert `LocalTime` to microseconds since midnight in 
`genericFromBeamField`
   - Add `AvroUtilsTest` coverage for the Avro schema and value conversion
   - Add a `ParquetTableProviderTest` case that inserts a `TIME` value into a 
Parquet table
   
   ## Testing
   
   - `:sdks:java:extensions:avro:test --tests 
"org.apache.beam.sdk.extensions.avro.schemas.utils.AvroUtilsTest"`
   - `:sdks:java:extensions:sql:test --tests 
"org.apache.beam.sdk.extensions.sql.meta.provider.parquet.ParquetTableProviderTest"`
   
   Closes #40994
   


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

  • [PR] [Avro] Support the portab... Anurag-S1ngh (via GitHub) via github

Reply via email to