Skip to content

remove legacy SQL incompatible modes#17609

Merged
gianm merged 4 commits intoapache:masterfrom
clintropolis:omg-finally-remove-replace-with-default
Jan 9, 2025
Merged

remove legacy SQL incompatible modes#17609
gianm merged 4 commits intoapache:masterfrom
clintropolis:omg-finally-remove-replace-with-default

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Description

changes:

  • druid.generic.useDefaultValueForNull is no longer wired up to anything and will log.warn if set to true
  • druid.generic.useThreeValueLogicForNativeFilters is no longer wired up to anything and will log.warn if set to false
  • clean up and simplify all code and tests related to null handling configs

Release note

todo


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.

changes:
* druid.generic.useDefaultValueForNull is no longer wired up to anything and will log.warn if set to true
* druid.generic.useThreeValueLogicForNativeFilters is no longer wired up to anything and will log.warn if set to false
* clean up and simplify all code and tests related to null handling configs
@clintropolis clintropolis force-pushed the omg-finally-remove-replace-with-default branch from b4dd668 to 8ace23c Compare January 8, 2025 03:23
Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

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

Generally LGTM. -47k lines, lol.

Could you please look into the CodeQL failure? On https://github.com/apache/druid/pull/17609/checks?check_run_id=35290326421 it says that "alerts not introduced by this pull request might have been detected because the code changes were too large". If they were all pre-existing then we can ignore the check. I just want to make sure this patch didn't introduce new problems.

Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

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

Looking at the CodeQL report, I see 54 "critical" or "error" items: https://github.com/apache/druid/security/code-scanning?query=pr%3A17609+tool%3ACodeQL+is%3Aopen+severity%3Acritical%2Cerror. The dates on these are all well in the past, so they appear to be pre-existing.

Based on this I am 👍 on the patch, since the rest of it looks good.

@gianm gianm merged commit 12e88b7 into apache:master Jan 9, 2025
@clintropolis clintropolis deleted the omg-finally-remove-replace-with-default branch January 10, 2025 04:20
@maytasm
Copy link
Copy Markdown
Contributor

maytasm commented Jan 10, 2025

@clintropolis What is the strategy for users still using the default value for NULL? Do we have a migration guide? I imagine switching to SQL compatibility mode would change the result/behavior of queries.

@clintropolis
Copy link
Copy Markdown
Member Author

@clintropolis What is the strategy for users still using the default value for NULL? Do we have a migration guide? I imagine switching to SQL compatibility mode would change the result/behavior of queries.

The current version of the migration guide is https://druid.apache.org/docs/latest/release-info/migration-guide/, though I'm still working on updating the docs after this PR was merged since there is some stale stuff.

@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
317brian pushed a commit to 317brian/druid that referenced this pull request Jan 28, 2025
* remove legacy SQL incompatible modes

changes:
* druid.generic.useDefaultValueForNull is no longer wired up to anything and will log.warn if set to true
* druid.generic.useThreeValueLogicForNativeFilters is no longer wired up to anything and will log.warn if set to false
* clean up and simplify all code and tests related to null handling configs

* fixes

* fix

* fix IT
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.

4 participants