Skip to content

fix: unwrap BigQuery REPEATED array elements during decoding#1963

Merged
datlechin merged 2 commits into
TableProApp:mainfrom
I-chat:fix/bigquery-repeated-field-decoding
Jul 26, 2026
Merged

fix: unwrap BigQuery REPEATED array elements during decoding#1963
datlechin merged 2 commits into
TableProApp:mainfrom
I-chat:fix/bigquery-repeated-field-decoding

Conversation

@I-chat

@I-chat I-chat commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • BigQuery wraps each element of a REPEATED array in its own {"v": ...} cell object, but BQCellValue.init(from:) decoded elements as bare values — every element spuriously matched .record(f: nil) and rendered as null, so any STRING REPEATED (or repeated STRUCT) column showed as [null, null, ...].
  • Array elements now decode as [BQQueryResponse.BQCell] and unwrap .v, so each element resolves to its real .string/.record/.null case.

Test plan

  • Added BigQueryTypeMapperJSONDecodingTests covering REPEATED STRING and REPEATED RECORD, decoding BigQuery's actual wrapped-array JSON shape end-to-end
  • Confirmed the new tests fail without the fix (reverted it locally, reran) and pass with it
  • Full TableProTests suite passes
  • Verified live against a real BigQuery table with a STRING REPEATED column

@datlechin
datlechin merged commit 473e790 into TableProApp:main Jul 26, 2026
3 checks passed
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