Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

refactor: add json operators to SQLGlot compiler#1887

Merged
chelsea-lin merged 1 commit into
mainfrom
main_chelsealin_unaryscalar
Jul 8, 2025
Merged

refactor: add json operators to SQLGlot compiler#1887
chelsea-lin merged 1 commit into
mainfrom
main_chelsealin_unaryscalar

Conversation

@chelsea-lin
Copy link
Copy Markdown
Contributor

@chelsea-lin chelsea-lin commented Jul 7, 2025

Fixes internal issue 430133370

@chelsea-lin chelsea-lin requested a review from sycai July 7, 2025 23:41
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jul 7, 2025
@chelsea-lin chelsea-lin marked this pull request as ready for review July 7, 2025 23:43
@chelsea-lin chelsea-lin requested review from a team July 7, 2025 23:43
Comment on lines +57 to +58
expected_sql = "JSON_EXTRACT_ARRAY(`bfcol_1`, '$') AS `bfcol_4`"
assert expected_sql in result.to_frame().sql
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-rhetorical question: why we only check substrings instead of using snapshot to match the full output?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to reduce the number of out.sql for less maintain cost, specially for these hundreds scalar operators, but open for discussions.

@chelsea-lin chelsea-lin enabled auto-merge (squash) July 8, 2025 17:02
@chelsea-lin chelsea-lin added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 8, 2025
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 8, 2025
@chelsea-lin chelsea-lin merged commit 0581a2a into main Jul 8, 2025
24 of 25 checks passed
@chelsea-lin chelsea-lin deleted the main_chelsealin_unaryscalar branch July 8, 2025 17:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants