Skip to content

fix(sqlalchemy-spanner): fix get_multi_indexes crash on SEARCH indexes#17907

Merged
sakthivelmanii merged 1 commit into
mainfrom
fix-spanner-reflection-search-index
Jul 27, 2026
Merged

fix(sqlalchemy-spanner): fix get_multi_indexes crash on SEARCH indexes#17907
sakthivelmanii merged 1 commit into
mainfrom
fix-spanner-reflection-search-index

Conversation

@sakthivelmanii

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@sakthivelmanii
sakthivelmanii requested a review from a team as a code owner July 27, 2026 13:45

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Spanner dialect to exclude SEARCH indexes from the results of get_multi_indexes and improves robustness when handling null or missing column orderings. It also adds unit tests to verify these changes. The reviewer suggested a cleaner approach for handling columns without explicit sorting by omitting them from the column_sorting dictionary entirely instead of mapping them to None, which aligns better with SQLAlchemy standards. Corresponding updates to the unit tests were also recommended.

Comment thread packages/sqlalchemy-spanner/tests/unit/test_dialect.py Outdated
@sakthivelmanii
sakthivelmanii force-pushed the fix-spanner-reflection-search-index branch 2 times, most recently from afe57b1 to 7b0f4c0 Compare July 27, 2026 13:56
@sakthivelmanii
sakthivelmanii force-pushed the fix-spanner-reflection-search-index branch from 7b0f4c0 to cfc408f Compare July 27, 2026 13:58
@sakthivelmanii
sakthivelmanii enabled auto-merge (squash) July 27, 2026 14:08
@sakthivelmanii
sakthivelmanii merged commit 5b2da81 into main Jul 27, 2026
41 of 42 checks passed
@sakthivelmanii
sakthivelmanii deleted the fix-spanner-reflection-search-index branch July 27, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants