Skip to content

Ignore Hive system schema when listing views/materialized views#16047

Merged
ebyhr merged 2 commits intotrinodb:masterfrom
findinpath:findinpath/trino-glue-catalog-list-views-bug
Feb 13, 2023
Merged

Ignore Hive system schema when listing views/materialized views#16047
ebyhr merged 2 commits intotrinodb:masterfrom
findinpath:findinpath/trino-glue-catalog-list-views-bug

Conversation

@findinpath
Copy link
Copy Markdown
Contributor

Description

On the Iceberg connector when trying to see the tables from within information_schema schema while working with AWS Glue metastore:

SHOW TABLES FROM s3.information_schema;

The following exception occurs:

"io.trino.plugin.iceberg.catalog.glue.TrinoGlueCatalog.listMaterializedViews(TrinoGlueCatalog.java:782)"
"io.trino.plugin.iceberg.IcebergMetadata.listMaterializedViews(IcebergMetadata.java:2477)"
"io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.listMaterializedViews(ClassLoaderSafeConnectorMetadata.java:961)"
"io.trino.plugin.objectstore.ObjectStoreMetadata.listMaterializedViews(ObjectStoreMetadata.java:317)"
"io.trino.metadata.MetadataManager.listMaterializedViews(MetadataManager.java:1296)"
"io.trino.metadata.MetadataListing.listMaterializedViews(MetadataListing.java:131)"
"io.trino.connector.informationschema.InformationSchemaPageSource.addTablesRecords(InformationSchemaPageSource.java:275)"
"io.trino.connector.informationschema.InformationSchemaPageSource.buildPages(InformationSchemaPageSource.java:215)"
"io.trino.connector.informationschema.InformationSchemaPageSource.getNextPage(InformationSchemaPageSource.java:179)"

Solution
Same as on the TrinoHiveCatalog make use of an utility method to ignore Hive system schemas while listing the views/materialized views:

Additional context and related issues

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

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

@cla-bot cla-bot bot added the cla-signed label Feb 9, 2023
@findinpath findinpath force-pushed the findinpath/trino-glue-catalog-list-views-bug branch from fa55deb to 3af7138 Compare February 9, 2023 17:01
@ebyhr
Copy link
Copy Markdown
Member

ebyhr commented Feb 10, 2023

/test-with-secrets sha=3af71387dd3c0699ed56490e6a4529a1b495e4dc

@findinpath
Copy link
Copy Markdown
Contributor Author

Unrelated failure on ci / test (plugin/trino-accumulo)

Error: write EPROTO 139828813293504:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:../deps/openssl/openssl/ssl/record/ssl3_record.c:677:

@github-actions
Copy link
Copy Markdown

The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/4140970565

@losipiuk
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

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

LGTM, but test-with-secrets failed. PTAL.

@ebyhr ebyhr merged commit a10c502 into trinodb:master Feb 13, 2023
@github-actions github-actions bot added this to the 407 milestone Feb 13, 2023
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