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

use NullFilter for SQL rewrite of MV_CONTAINS and MV_OVERLAP for null array elements #15855

Merged

Conversation

clintropolis
Copy link
Member

Description

Fixes an oversight after #14542 that happens in the SQL planner rewrite of MV_CONTAINS and MV_OVERLAP when faced with array elements that are NULL, where we were incorrectly using EqualityFilter instead of NullFilter for null elements (EqualityFilter does not accept null elements).

Without the changes of this PR, the added tests would fail with errors like:

org.apache.druid.error.DruidException: Invalid equality filter on column [dim3], matchValue cannot be null

This PR has:

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

@abhishekagarwal87 abhishekagarwal87 added this to the 29.0.0 milestone Feb 7, 2024
@abhishekagarwal87 abhishekagarwal87 merged commit 23d4fad into apache:master Feb 7, 2024
81 of 83 checks passed
@clintropolis clintropolis deleted the fix-mv_contains-planner-rewrite branch February 7, 2024 21:25
LakshSingla pushed a commit to LakshSingla/druid that referenced this pull request Feb 8, 2024
… array elements (apache#15855)

Fixes an oversight after apache#14542 that happens in the SQL planner rewrite of MV_CONTAINS and MV_OVERLAP when faced with array elements that are NULL, where we were incorrectly using EqualityFilter instead of NullFilter for null elements (EqualityFilter does not accept null elements).
abhishekagarwal87 pushed a commit that referenced this pull request Feb 8, 2024
… array elements (#15855) (#15865)

Fixes an oversight after #14542 that happens in the SQL planner rewrite of MV_CONTAINS and MV_OVERLAP when faced with array elements that are NULL, where we were incorrectly using EqualityFilter instead of NullFilter for null elements (EqualityFilter does not accept null elements).

Co-authored-by: Clint Wylie <[email protected]>
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.

2 participants