fix: read_gbq_table respects primary keys even when filters are set#689
Merged
fix: read_gbq_table respects primary keys even when filters are set#689
read_gbq_table respects primary keys even when filters are set#689Conversation
Closes internal issues 338039517 (primary key inconsistency), 338037499 (LIMIT for max_results), 340540991 (avoid running query immediately if time travel is supported), 337925142 (push down column filters to when we create the time travel subquery). feat: `read_gbq_query` supports `filters` perf: use a `LIMIT` clause when `max_results` is set perf: don't run query immediately from `read_gbq_table` if `filters` is set
Contributor
TrevorBergeron
left a comment
There was a problem hiding this comment.
mostly looks good, seems we've lost some validation on unknown column names though?
…able-primary_keys
tswast
commented
May 16, 2024
bigframes/session/__init__.py
Outdated
| time_travel_timestamp=time_travel_timestamp, | ||
| ) | ||
|
|
||
| for key in columns: |
Collaborator
Author
There was a problem hiding this comment.
@TrevorBergeron Which "validation for unknown column names'" are we missing? I still see this here.
Collaborator
Author
There was a problem hiding this comment.
Would you like me to move it to before we create the ibis expression? It's possible ibis will fail with a dry run error when we try to access the columns in it now.
Collaborator
Author
There was a problem hiding this comment.
I see tests/system/small/test_session.py::test_read_gbq_w_columns[unknown_col] failure now. Likely this is the issue. I'll move this validation to after we tech the table metadata.
…y_keys' into b338039517-read_gbq_table-primary_keys
TrevorBergeron
approved these changes
May 16, 2024
…y_keys' into b338039517-read_gbq_table-primary_keys
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.
Closes internal issues 338039517 (primary key inconsistency), 338037499 (LIMIT for max_results), 340540991 (avoid running query immediately if time travel is supported), 337925142 (push down column filters to when we create the time travel subquery).
feat:
read_gbq_querysupportsfiltersperf: use a
LIMITclause whenmax_resultsis setperf: don't run query immediately from
read_gbq_tableiffiltersis set🦕