-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Filter information_schema
within engine
#16080
Conversation
9e5f500
to
26da64e
Compare
26da64e
to
7df9deb
Compare
7df9deb
to
1c9ec05
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/TrinoGlueCatalog.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
4784c9a
to
6db2f57
Compare
|
core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
0b398f9
to
b8c7c1c
Compare
b8c7c1c
to
84887e4
Compare
@@ -1431,6 +1466,16 @@ public void setMaterializedViewProperties(Session session, QualifiedObjectName v | |||
metadata.setMaterializedViewProperties(session.toConnectorSession(catalogHandle), viewName.asSchemaTableName(), properties); | |||
} | |||
|
|||
private static boolean isExternalInformationSchema(CatalogHandle catalogHandle, Optional<String> schemaName) | |||
{ | |||
return isExternalInformationSchema(catalogHandle, schemaName.orElse(null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return schemaName.isPresent() && ...
so that the other method doesn't have to have @Nullable
String schemaName = schema.toLowerCase(ENGLISH); | ||
return !(schemaName.equals("information_schema") || schemaName.equals("sys")); | ||
}) | ||
.filter(schema -> !schema.toLowerCase(ENGLISH).equals("sys")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equalsIgnoreCase?
@@ -1098,11 +1098,6 @@ public static String sortingColumnToString(SortingColumn column) | |||
|
|||
public static boolean isHiveSystemSchema(String schemaName) | |||
{ | |||
if ("information_schema".equals(schemaName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isHiveSystemSchema("information_schema")
should still return true, because "information_schema" is indeed a Hive system schema.
we should reword the comment though
@@ -153,7 +153,7 @@ public void testMetadataCalls() | |||
"VALUES 2", | |||
new MetadataCallsCount() | |||
.withListSchemasCount(1) | |||
.withListTablesCount(3)); | |||
.withListTablesCount(2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
84887e4
to
88e66a2
Compare
88e66a2
to
ff8876b
Compare
CI hit #16406 |
Description
Fixes #1559
Additional context and related issues
Release notes
(x) This is not user-visible or docs only and no release notes are required.