Repository navigation
Preserve one-shot column iterables in full-text search queries - #943
Open
pengpengyi92 wants to merge 1 commit into
Open
pengpengyi92 wants to merge 1 commit into
pengpengyi92 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #942.
search_sqliteratescolumnstwice, for the CTE and outer SELECT projections. A generator is exhausted after the first pass, producing an empty outer SELECT list. Materialize the iterable once before the existing projection logic;None, lists and tuples keep their behavior, and empty iterators now follow the existing empty-list default.The new tests execute real FTS4/FTS5 queries through both
search_sqlandsearch. They cover empty/single/multiple column selections, list/tuple/iterator/generator inputs, output column order, filtering/pagination, rank inclusion, escaped column names and theoriginalalias collision case.Validation on Python 3.12.13 / SQLite 3.53.1:
test_fts.pyandtest_query.py, in both default and--sqlite-autocommitmodes.Only the search projection is changed, not index creation, query matching, SQL escaping or transaction handling. A consumed generator is not made reusable across separate calls. The complete optional-extension/OS matrix was not run.
AI assistance: prepared and checked with OpenAI Codex; no independent human review or hosted CI success is claimed.
📚 Documentation preview 📚: https://sqlite-utils--943.org.readthedocs.build/en/943/