Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

clintropolis
Copy link
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
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