diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseSharedMetastoreTest.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseSharedMetastoreTest.java index a5aad0c7c525..1f3ee382e608 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseSharedMetastoreTest.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseSharedMetastoreTest.java @@ -52,19 +52,19 @@ public void testSelect() @Test public void testReadInformationSchema() { - assertThat(query("SELECT table_schema FROM hive.information_schema.tables WHERE table_name = 'region'")) + assertThat(query("SELECT table_schema FROM hive.information_schema.tables WHERE table_name = 'region' AND table_schema='" + schema + "'")) .skippingTypesCheck() .containsAll("VALUES '" + schema + "'"); - assertThat(query("SELECT table_schema FROM iceberg.information_schema.tables WHERE table_name = 'nation'")) + assertThat(query("SELECT table_schema FROM iceberg.information_schema.tables WHERE table_name = 'nation' AND table_schema='" + schema + "'")) .skippingTypesCheck() .containsAll("VALUES '" + schema + "'"); - assertThat(query("SELECT table_schema FROM hive_with_redirections.information_schema.tables WHERE table_name = 'region'")) + assertThat(query("SELECT table_schema FROM hive_with_redirections.information_schema.tables WHERE table_name = 'region' AND table_schema='" + schema + "'")) .skippingTypesCheck() .containsAll("VALUES '" + schema + "'"); - assertThat(query("SELECT table_schema FROM hive_with_redirections.information_schema.tables WHERE table_name = 'nation'")) + assertThat(query("SELECT table_schema FROM hive_with_redirections.information_schema.tables WHERE table_name = 'nation' AND table_schema='" + schema + "'")) .skippingTypesCheck() .containsAll("VALUES '" + schema + "'"); - assertThat(query("SELECT table_schema FROM iceberg_with_redirections.information_schema.tables WHERE table_name = 'region'")) + assertThat(query("SELECT table_schema FROM iceberg_with_redirections.information_schema.tables WHERE table_name = 'region' AND table_schema='" + schema + "'")) .skippingTypesCheck() .containsAll("VALUES '" + schema + "'");