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

Fix information_schema query failures in BigQuery connector #7830

Merged

Conversation

hashhar
Copy link
Member

@hashhar hashhar commented May 4, 2021

In 212e1bb the toRemoteTable method
called listTables unconditionally instead of returning early if
case-insensitive name matching is not enabled.
That caused query failures for information_schema queries because
instead of an early return it tried to list tables in a remote schema
called information_schema (which isn't intended).

This change fixes the issue by making the listTables call lazy by using
a Supplier instead of a materialized iterable.

In 212e1bb the toRemoteTable method
called listTables unconditionally instead of returning early if
case-insensitive name matching is not enabled.
That caused query failures for information_schema queries because
instead of an early return it tried to list tables in a remote schema
called `information_schema` (which isn't intended).

This change fixes the issue by making the listTables call lazy by using
a Supplier instead of a materialized iterable.
@hashhar hashhar requested review from losipiuk, aalbu and ebyhr May 4, 2021 05:59
@cla-bot cla-bot bot added the cla-signed label May 4, 2021
@hashhar hashhar merged commit 41be8e3 into trinodb:master May 4, 2021
@hashhar hashhar deleted the hashhar/fix-bigquery-information-schema branch May 4, 2021 08:35
@hashhar hashhar added this to the 357 milestone May 4, 2021
@hashhar hashhar mentioned this pull request May 4, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants