You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "clintropolis (via GitHub)" <gi...@apache.org> on 2023/12/07 03:28:29 UTC
[PR] store auto columns with only empty or null containing arrays as ARRAY instead of COMPLEX (druid)
clintropolis opened a new pull request, #15505:
URL: https://github.com/apache/druid/pull/15505
### Description
Fixes a bug with 'auto' column indexer when the column being processed contains only arrays without strong type information, such as `[]` or `[null, null]` etc, which previously would be stored generically as `COMPLEX<json>` typed. This however isn't very chill since this overrides any other type in the SQL schema, so instead we now choose `ARRAY<LONG>`, which is the most restrictive array type and easily coerced to the other array types. This allows segments with columns that only have empty or null containing arrays to still be handled as array types, using array functions and things like `UNNEST`.
#### Release note
Columns ingested with the `auto` column indexer that contain only empty or null containing arrays are now stored as `ARRAY<LONG>` instead of `COMPLEX<json>`.
<hr>
This PR has:
- [ ] been self-reviewed.
- [x] a release note entry in the PR description.
- [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [x] 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.
- [x] been tested in a test Druid cluster.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] store auto columns with only empty or null containing arrays as ARRAY instead of COMPLEX (druid)
Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis merged PR #15505:
URL: https://github.com/apache/druid/pull/15505
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org