Repository navigation
fix(desktop): resolve unqualified imported JOIN tables in S3 queries - #58
Merged
Merged
Conversation
Tables added via "Add a table from another database to the JOIN" were only staged into the S3 query engine when written as local."name". The local DuckDB tab suggests the plain "name", so pasting it into an S3 query failed. Detect bare identifier references too and expose each staged dataset as a main.<name> view alongside local.<name>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Tables added with "Add a table from another database to the JOIN" are copied to local DuckDB. The S3 query engine only staged them when the SQL wrote them as
local."name". The local DuckDB tab opened from the sidebar suggests the plain"name", so an S3 query such asfailed with a missing-table error, which looked like the S3 part had broken.
with_s3_catalognow also stages local/federated datasets referenced by bare identifier (via the existingsql_tokens_with_identifierstokenizer, so strings and comments are ignored).main.<name>in addition tolocal.<name>. Unqualified names resolve only inmain, so this never shadows the S3 views registered under bucket schemas; it is skipped if an S3 source is itselfmain.<name>.Tests
s3_catalog_query_reads_an_imported_join_table_without_s3_sources: CTE named like the imported table reading it unqualified, plusLEFT JOIN.cargo test --lib s3_catalog_query: 2 passed.cargo test --lib: 81 passed, 1 failed:development_runtime_paths_resolve_to_real_project_dependencies, which needs a dev Node executable that this worktree lacks; unrelated to this change.test:fast) passed.Release notes
"dim_documento"), not only aslocal."dim_documento".🤖 Generated with Claude Code