Skip to content

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

Merged
gianm merged 4 commits intoapache:masterfrom
clintropolis:fix-search-query-index-partitioning
Jan 27, 2025
Merged

fix search query to check for the specific type of indexes it requires instead of using capabilities#17662
gianm merged 4 commits intoapache:masterfrom
clintropolis:fix-search-query-index-partitioning

Conversation

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