Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

refactor: define sqlglot compiler for readlocalnode #1344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
Loading
from

Conversation

chelsea-lin
Copy link
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 #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jan 30, 2025
):
bf_df = bpd.DataFrame(inline_pd_df, session=sql_compiler_session)
expected_sql = "SELECT * FROM UNNEST(ARRAY<STRUCT<`level_0` INT64, `column_0` INT64, `column_1` INT64, `column_2` BOOLEAN, `column_3` STRING>>[(0, 1, -10, TRUE, 'b'), (1, 2, 20, CAST(NULL AS BOOLEAN), 'aa'), (2, 3, 30, FALSE, 'ccc')]) AS `table_alias`"
assert bf_df.sql == expected_sql
Copy link
Collaborator

Choose a reason for hiding this comment

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

Neat!

I'm looking forward to seeing more of these sorts of "golden SQL" tests in future.

@chelsea-lin chelsea-lin force-pushed the main_chelsealin_readlocalnode branch from 615e88e to 40b5ec0 Compare February 28, 2025 19:23
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_readlocalnode branch from 40b5ec0 to 42b10a1 Compare March 5, 2025 19:01
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_readlocalnode branch from 42b10a1 to 7e88896 Compare March 10, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.