Skip to content

nested column support for Parquet and Avro - #13325

Merged
clintropolis merged 2 commits into
apache:masterfrom
clintropolis:nested-column-parquet-avro
Nov 15, 2022
Merged

clintropolis merged 2 commits into
apache:masterfrom
clintropolis:nested-column-parquet-avro

Conversation

@clintropolis

Copy link
Copy Markdown
Member

Description

This PR officially adds support for Parquet and Avro for Druid nested columns, including using the 'JSON' transformation functions at ingestion time. Along the way, fixes a couple of issues with using these same functions during ingest time, particularly when the top level object is a List/Array instead of an object. This particular code area was a bit obsolete, expecting only the primitive Druid ARRAY types to be handled, but that is no longer true after the introduction of nested arrays and complex expression types (e.g. arrays of complex types). I've expanded this code area to fall back on using ExprEval.bestEffortOf to determine the type of the array. This isn't actually specific to Parquet or Avro, these errors could occur with JSON and potentially any other nested list input values intended to be used in expressions.

Release note

Druid nested columns now support Parquet and Avro input formats, either to ingest directly into nested columns, or using the 'JSON' expressions as transforms, such as JSON_VALUE and JSON_QUERY.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • 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 is met.
  • been tested in a test Druid cluster.

@clintropolis
clintropolis merged commit 309cae7 into apache:master Nov 15, 2022
@clintropolis
clintropolis deleted the nested-column-parquet-avro branch November 15, 2022 00:09
@kfaraz kfaraz added this to the 25.0 milestone Nov 22, 2022
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
* nested column support for Parquet and Avro

* style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants