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

Ignore views on information_schema.columns queries #11946

Conversation

findinpath
Copy link
Contributor

Description

The queries on delta.information_schema.columns don't work in the presence of a Hive view in the shared metastore service (HMS/Glue).

On such queries the user receives:

NotADeltaLakeTableException: test.v_hivetable is not a Delta Lake table

This bugfix uses the same technique employed on the Iceberg connnector for throwing a TableNotFoundException which is catched on streamTableColumns() method on the DeltaLakeMetadata so that views can be ignored.

The PR depends on #11565 for testing

Is this change a fix, improvement, new feature, refactoring, or other?

Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Delta Lake connector

Related issues, pull requests, and links

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

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

@cla-bot cla-bot bot added the cla-signed label Apr 14, 2022
@findinpath findinpath marked this pull request as ready for review April 14, 2022 13:19
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

is it testable?

i guess Delta vs Trino views could be tested without product tests, with a file metastore.
We should then follow up with Hive-Delta product tests once we have Delta product tests.

@findinpath findinpath force-pushed the delta-information-schema-columns-on-presence-of-hive-view branch from 1dc3c76 to ba42b8c Compare April 19, 2022 11:44
@findinpath findinpath changed the title Ignore Hive views on information_schema.columns queries Ignore views on information_schema.columns queries Apr 19, 2022
@findinpath findinpath force-pushed the delta-information-schema-columns-on-presence-of-hive-view branch from ba42b8c to ce1eb52 Compare April 19, 2022 15:53
@findinpath
Copy link
Contributor Author

is it testable?

@findepi yes it is testable with AWS Glue infrastructure. Thanks for raising this point.

@findinpath findinpath force-pushed the delta-information-schema-columns-on-presence-of-hive-view branch from ce1eb52 to bea1ef7 Compare April 19, 2022 20:17
@findepi
Copy link
Member

findepi commented Apr 20, 2022

Test PR: #12046 (cc @ilfrin @nineinchnick for potentially streamlining this)

@findepi findepi merged commit c0812bb into trinodb:master Apr 20, 2022
@findepi findepi mentioned this pull request Apr 20, 2022
@github-actions github-actions bot added this to the 378 milestone Apr 20, 2022
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.

3 participants