-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
feat(sqllab): add latest partition support for BigQuery #30760
base: master
Are you sure you want to change the base?
Conversation
) | ||
assert result == expected_result | ||
|
||
def test_get_indexes(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turns out BigQuery's implementation of get_indexes is a no-op -> https://github.com/googleapis/python-bigquery-sqlalchemy/blob/150143ce27c02f1cd711b8df4ffe587a98ada288/sqlalchemy_bigquery/base.py#L1266-L1268
@@ -40,6 +40,7 @@ | |||
EXAMPLES_HOST = os.getenv("EXAMPLES_HOST") | |||
EXAMPLES_PORT = os.getenv("EXAMPLES_PORT") | |||
EXAMPLES_DB = os.getenv("EXAMPLES_DB") | |||
SHOW_STACKTRACE = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intended to be part of the PR, or just for local/temporary dev purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me remove that line, now thinking it may make sense to deprecate this flag as it's not evenly implemented.
Adding db_engine_spec-related features that enables SQL Lab to show the latest partition when using time partitioning in BigQuery as well as applying a WHERE clause on the latest partition by default when fetching the sample dataset. Turns out that `SELECT * FROM {{...}} LIMIT {n}` can be costly against large tables in BigQuery as it results in a full table scan.
14e90ba
to
97f0bfa
Compare
Adding db_engine_spec-related features that enables SQL Lab to show the latest partition when using time partitioning in BigQuery as well as applying a WHERE clause on the latest partition by default when fetching the sample dataset. Turns out that
SELECT * FROM {{...}} LIMIT {n}
can be costly against large tables in BigQuery as it results in a full table scan.closes #17299