Skip to content

allow expression "best effort" type determination to better handle mixed type arrays#14438

Merged
clintropolis merged 2 commits intoapache:masterfrom
clintropolis:expression-better-nested-array-handling
Jun 16, 2023
Merged

allow expression "best effort" type determination to better handle mixed type arrays#14438
clintropolis merged 2 commits intoapache:masterfrom
clintropolis:expression-better-nested-array-handling

Conversation

@clintropolis
Copy link
Member

Description

This PR fixes issues that can happen during ingestion of 'auto' typed columns which receive input with mixed type arrays; Druid ARRAY types only support all elements of the same type. The ARRAY "best effort" code has been modified to use the "least restrictive" logic that is now also used by default for the computed SQL schema, allowing things like [["a", "b", "c"], {"x": 123}] to now be handled as ARRAY<COMPLEX<json>> rather than throwing an incompatible type exception.


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 or updated version, license, or notice information in licenses.yaml
  • 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.
  • added integration tests.
  • been tested in a test Druid cluster.

@clintropolis clintropolis merged commit 359bd63 into apache:master Jun 16, 2023
@clintropolis clintropolis deleted the expression-better-nested-array-handling branch June 16, 2023 07:02
@abhishekagarwal87 abhishekagarwal87 added this to the 27.0 milestone Jul 19, 2023
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