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

WhereCqlClauseAnalyzer.isIndexOnColumn has incorrect index test #1779

Open
amorton opened this issue Dec 5, 2024 · 0 comments
Open

WhereCqlClauseAnalyzer.isIndexOnColumn has incorrect index test #1779

amorton opened this issue Dec 5, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@amorton
Copy link
Contributor

amorton commented Dec 5, 2024

code is

  private boolean isIndexOnColumn(CqlIdentifier column) {
    // NOTE: does not check the type of the secondary index, assuming all is SAI
    // have to use list because the indexes are keyed on the index name, not the column name.
    // TODO: confirm it is OK to not check the index type and properties
    return tableMetadata.getIndexes().values().stream()
        .anyMatch(index -> index.getTarget().equals(column.asInternal()));
  }

But the target on the indexMetadata is not just the column name, this was written before the API had it's own schema objects which we should use via the ApiTableDef.

@amorton amorton added the Bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant