Skip to content

allow DruidSchema to fallback to segment metadata 'type' if 'typeSignature' is null#12016

Merged
clintropolis merged 2 commits intoapache:masterfrom
clintropolis:druid-schema-use-fallback-type
Dec 3, 2021
Merged

allow DruidSchema to fallback to segment metadata 'type' if 'typeSignature' is null#12016
clintropolis merged 2 commits intoapache:masterfrom
clintropolis:druid-schema-use-fallback-type

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Description

This PR adds a fallback mechanism to DruidSchema to use the legacy 'type' string field of segment metadata results, after #11895 changed DruidSchema to use a new, richer, typeSignature field instead. This fixes an issue where the SQL schema for a datasource can be marked entirely as COMPLEX typed columns if a broker is updated to 0.23 before historical servers are, and will remain in this state until restarted or all segments have been moved to new servers after all historicals are upgraded. See #11713 (comment) for details.

This PR has:

  • been self-reviewed.
  • 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.

…ture is null, to avoid producing incorrect SQL schema if broker is upgraded to 0.23 before historicals
Copy link
Copy Markdown
Member

@asdf2014 asdf2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM, thanks a lot

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.

5 participants