Skip to content
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

Add support for case insensitive name cache in BigQuery #21988

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented May 16, 2024

Description

Supersedes #19624
Fixes #10740

Test on a schema with 180 tables:

trino> select * from bigquery.test.test_ebi;
 a
---
 1
(1 row)
9.47 [1 rows, 2B] [0 rows/s, 0B/s]

trino> select * from bigquery.test.test_ebi;
 a
---
 1
(1 row)
2.27 [1 rows, 2B] [0 rows/s, 1B/s]

trino> select * from bigquery.test.test_ebi;
 a
---
 1
(1 row)
2.93 [1 rows, 2B] [0 rows/s, 1B/s]

Release notes

(x) Release notes are required, with the following suggested text:

# BigQuery
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 16, 2024
@github-actions github-actions bot added the bigquery BigQuery connector label May 16, 2024
@github-actions github-actions bot added the docs label May 16, 2024
@@ -113,9 +116,19 @@ public BigQueryClient(
.expireAfterWrite(metadataCacheTtl.toMillis(), MILLISECONDS)
.shareNothingWhenDisabled()
.build(CacheLoader.from(this::listDatasetIdsFromBigQuery));
this.remoteDatasetCaseInsentiveCache = buildCache(caseInsensitiveNameMatchingCacheTtl);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need two separate caches if they have same ttl?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean merging remoteDatasetCaseInsentiveCache & remoteDatasetIdCache into one?

Copy link
Contributor

Choose a reason for hiding this comment

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

remoteDatasetCaseInsentiveCache & remoteTableCaseInsentiveCache

@ebyhr ebyhr force-pushed the ebi/metadata-cache branch 8 times, most recently from e8e1c83 to 2998aba Compare May 22, 2024 22:59
@ebyhr ebyhr force-pushed the ebi/metadata-cache branch 2 times, most recently from d9e89b7 to 48b04c4 Compare June 1, 2024 00:42
@ebyhr
Copy link
Member Author

ebyhr commented Jun 4, 2024

@wendigo @hashhar Could you please take another look?

Co-authored-by: regadas <oss@regadas.email>
@ebyhr ebyhr merged commit 1cc3c7e into master Jun 6, 2024
3 of 14 checks passed
@ebyhr ebyhr deleted the ebi/metadata-cache branch June 6, 2024 12:08
@github-actions github-actions bot added this to the 450 milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Bigquery connector: no caching for case insensitive names
4 participants