josephglanville opened a new pull request #10505:
URL: https://github.com/apache/druid/pull/10505


   Fixes #10493 
   
   ### Description
   
   Implements better support for Avro unions in the Avro extensions.
   Currently when ingesting data that contains unions unless the union is 
always the same value it will return mixed type results.
   This PR addresses the problem by exploding union fields into maps keyed by 
the union member type or type name in the case of named types (enums, fixed, 
records).
   The method was chosen as it's similar to what is done on other systems that 
support ingesting Avro data, such as Google BigQuery which details their Avro 
compatibility here: 
https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-avro#avro_conversions
   
   <hr>
   
   This PR has:
   - [ ] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `AvroFlattenerMaker`
    * `GenericAvroJsonProvider`


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

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