Repository navigation
Address tables by their full path so same-named tables don't collide - #3
Merged
Merged
Conversation
…occy#532) tabledata.list, extract jobs and the Storage Read API queried a table by its bare ID. googlesqlite resolves a bare name to the first dataset holding a table of that name, so with ds1.t and ds2.t both present, reading ds2.t returned ds1.t's rows. Expose the existing validated contentdata tablePath helper as TablePath and use it at all three call sites, as TruncateTable and CountTableRows already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was committed with the fix by accident and is unrelated to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zeus26286
approved these changes
Nov 3, 2026
Zeus26286
left a comment
Owner
There was a problem hiding this comment.
Looks good. tabledata.list, extract jobs and the Storage Read API now query project.dataset.table through TablePath. I grepped for other query builders that use a bare table ID and found none: every remaining FROM/TABLE with a %s in non-test code already uses the full path. Both regression tests cover the same-named-table case.
Verified locally: go vet ./... and go test ./... -count=1 pass with #1, #3, #4 and #2 merged together.
Merge note: this and #4 both append a test at the end of server/server_test.go, so whichever merges second gets a trivial conflict. Keep both tests.
Generated by Claude Code
Zeus26286
pushed a commit
that referenced
this pull request
Nov 3, 2026
Resolve the conflict in server/server_test.go by keeping both TestIssue532SameTableNameInTwoDatasets (from #3) and TestIssue498BytesRoundTrip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019tgEtTxTsLWxmQawCfsQQa
Zeus26286
pushed a commit
that referenced
this pull request
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019tgEtTxTsLWxmQawCfsQQa
Zeus26286
pushed a commit
that referenced
this pull request
Nov 3, 2026
* docs: track the top 10 BigQuery compatibility priorities Record the ranked list of the most urgent gaps between the emulator and real BigQuery, with the evidence and upstream issues/PRs for each, and mark goccy#532 and goccy#498 as fixed on their branches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: mark compatibility priority #3 (DDL catalog sync) as fixed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: address review on the compatibility priorities list - Link every issue/PR number to goccy/bigquery-emulator; bare #N autolinked to this fork. - Mark section 3's heading fixed, matching the table and body. - Link the item 1-3 fix branches, now pushed, and PR #1 for item 3. - List upstream 519 and 520 only as PRs; they are not issues. - Clarify that ✅ means fixed on a fork branch, not merged yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: link the PRs for compatibility priorities #1 and #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: mark compatibility priorities #1-#3 as merged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019tgEtTxTsLWxmQawCfsQQa --------- 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.
Fixes compatibility priority #1:
tabledata.listreturned another dataset's table of the same name (upstream goccy#532).Problem
With
ds1.tandds2.tboth present, listingds2.treturnedds1.t's rows. tabledata.list, extract jobs and the Storage Read API queried the table by its bare ID, and googlesqlite resolves a bare name to the first dataset that has a table with that name. The result was silently wrong data.Changes
internal/contentdata/repository.go: export the existing validatedtablePathhelper asTablePath.server/handler.go(tabledata.list, extract jobs) andserver/storage_handler.go(Storage Read API): address tables by their fullproject.dataset.tablepath, asTruncateTableandCountTableRowsalready do.A
CLAUDE.mdhad been committed alongside the fix by accident. It's removed again in e5f2da2, so it isn't part of this PR's diff.Tests
TestIssue532SameTableNameInTwoDatasets(tabledata.list and extract job) andTestIssue532StorageReadSameTableNameInTwoDatasets(Storage Read API).go vet ./...and the full unit suite pass.ArgumentError: wrong number of arguments (given 2, expected 1). This already happens onmain: a fresh image build picks up json 3.x, which multi_json can't call. Keep the table catalog in sync with DDL #1 fixes it.Merging
This PR and #4 (BYTES fix) both add their regression test at the same place at the end of
server/server_test.go. Whichever merges second needs a trivial conflict resolution that keeps both tests. Neither conflicts with #1.🤖 Generated with Claude Code