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

fix search query to check for the specific type of indexes it requires instead of using capabilities #17662

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

clintropolis
Copy link
Member

Description

Fixes issue noticed in #16577 (comment).

The problem is that the search query was using ColumnCapabilities.hasBitmapIndexes() to check if it could use the indexes strategy, which used to be ok when there were only indexes on string columns and so every column with that set would also have a DictionaryEncodedStringValueIndex, but is no longer the case.

To fix, the search query now explicitly checks for columns having a DictionaryEncodedStringValueIndex available since that is what the 'use indexes' strategy requires.

The added test fails without the code changes in this PR.


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.

Copy link
Contributor

@maytasm maytasm left a comment

Choose a reason for hiding this comment

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

Thanks for the quick look and fix!

@gianm gianm merged commit e2bfc23 into apache:master Jan 27, 2025
79 checks passed
@clintropolis clintropolis deleted the fix-search-query-index-partitioning branch January 27, 2025 20:51
clintropolis added a commit to clintropolis/druid that referenced this pull request Jan 27, 2025
…s instead of using capabilities (apache#17662)

* fix search query to check for the specific type of indexes it requires instead of using capabilities

* cleanup

* add comment
@clintropolis clintropolis added this to the 32.0.0 milestone Jan 27, 2025
317brian pushed a commit to 317brian/druid that referenced this pull request Jan 28, 2025
…s instead of using capabilities (apache#17662)

* fix search query to check for the specific type of indexes it requires instead of using capabilities

* cleanup

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants