Repository navigation
Conversation
Contributor
We've dealt with this for Snowflake too and decided to enable this behavior with a flag. We're also working on a proposal that will (among other things) overhaul the metadata APIs to make pattern vs literal match explicit; I should remember to add statistics to the list of followups. |
This branch has not been deployed
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.
What's Changed
GetStatisticsresolved the catalog and schema arguments only by matching them against the connection's project and the output ofdatasets.list. That has two consequences:bigquery-public-data) were not available.datasets.listreturned it. Every call listed all datasets in the project first, even when the caller named one schema.This change resolves exact names directly:
%or_is used as the project. A pattern still matches only the connection's project.%is used as it is, and the dataset listing is skipped. A named schema that does not exist returns an empty result, as before. Schemas with%take the listing path unchanged.Behaviour changes to review
%is now taken literally. Under the ADBC pattern rules_matches any single character, sodata_etused to also matchdataset; now it matches onlydata_et. Nearly every BigQuery dataset name contains an underscore, so treating it as a wildcard would send almost every exact name through the listing path.GetStatisticsno longer callsdatasets.list. Against a project with about 300 datasets this took a single-table call from 4-5 s to about 1.8 s.Testing
TestGetStatisticsPublicDataset: statistics forbigquery-public-data.samples.shakespearefrom a connection to a different project.TestGetStatistics,TestGetStatisticsHiddenDatasetand the new test pass against a live project.