fix: add table qualification to filters_idx WHERE clause to resolve ambiguous column errors in reverse join#368
Merged
halconel merged 5 commits intoepoch8:feat/offsetsfrom Jan 27, 2026
Conversation
…mbiguous column errors in reverse join
… column qualification
…vent SQLite type conversion errors
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.
Problem
When using
join_keyswithfilters_idx, SQL queries with JOIN failed with:The
sql_apply_filters_idx_to_subqueryfunction usedsa.column(i)without table qualification, which worked for simple SELECT queries but failed for JOIN queries with multiple tables sharing column names.Solution
Added optional
tblparameter tosql_apply_filters_idx_to_subquery:tblis provided → usetbl.c[i](qualified column name)tbl=None→ usesa.column(i)(backward compatibility)Updated all call sites to pass table reference.
What this fixes
✅ Reverse join now works correctly with
join_keysandfilters_idx✅ Solves LEFT JOIN issues with asynchronously updated tables
✅ Maintains backward compatibility