Skip to content

fix(sqlalchemy-bigquery): escape JSON subfields - #19049

Draft
tswast wants to merge 4 commits into
mainfrom
b581916031-sqlalchemy
Draft

tswast wants to merge 4 commits into
mainfrom
b581916031-sqlalchemy

Conversation

@tswast

@tswast tswast commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes internal issue b/581916031 🦕

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request implements native JSON subscripting and multi-step JSON path lookups (JSON_QUERY) for the BigQuery dialect, resolving issues with SQL injection and parameter typing. It also updates identifier escaping for backticks and backslashes, and sets supports_native_json_deserialization to True to prevent double-deserialization. Feedback is provided to make the _get_struct_type helper more robust by recursively unwrapping nested TypeDecorators using a loop.

tswast and others added 3 commits November 12, 2026 09:09
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@tswast

tswast commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Rather than try to solve the Python 3.10 test failure, I'm also tasked with dropping Python 3.10 support (b/581948327, b/581950408), so I'll work on that first.

@tswast tswast changed the title fix: escape JSON subfields fix(sqlalchemy-bigquery): escape JSON subfields Nov 12, 2026

This branch has not been deployed

No deployments
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.

1 participant