Skip to content

Commit

Permalink
Enable Iceberg Glue materialized view tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjo2144 authored and findepi committed Sep 19, 2022
1 parent 47c1fb1 commit 79dc367
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
import static io.trino.plugin.iceberg.TableType.PARTITIONS;
import static io.trino.plugin.iceberg.TableType.PROPERTIES;
import static io.trino.plugin.iceberg.TableType.SNAPSHOTS;
import static io.trino.plugin.iceberg.catalog.glue.GlueMetastoreMethod.CREATE_TABLE;
import static io.trino.plugin.iceberg.catalog.glue.GlueMetastoreMethod.GET_DATABASE;
import static io.trino.plugin.iceberg.catalog.glue.GlueMetastoreMethod.GET_TABLE;
import static io.trino.plugin.iceberg.catalog.glue.GlueMetastoreMethod.*;
import static io.trino.testing.TestingSession.testSessionBuilder;
import static io.trino.testing.sql.TestTable.randomTableSuffix;
import static java.lang.String.format;
Expand Down Expand Up @@ -220,7 +218,7 @@ public void testSelectFromViewWithFilter()
}
}

@Test(enabled = false)
@Test
public void testSelectFromMaterializedView()
{
try {
Expand All @@ -229,7 +227,7 @@ public void testSelectFromMaterializedView()

assertGlueMetastoreApiInvocations("SELECT * FROM test_select_mview_view",
ImmutableMultiset.builder()
.addCopies(GET_TABLE, 3)
.addCopies(GET_TABLE, 6)
.build());
}
finally {
Expand All @@ -238,7 +236,7 @@ public void testSelectFromMaterializedView()
}
}

@Test(enabled = false)
@Test
public void testSelectFromMaterializedViewWithFilter()
{
try {
Expand All @@ -247,7 +245,7 @@ public void testSelectFromMaterializedViewWithFilter()

assertGlueMetastoreApiInvocations("SELECT * FROM test_select_mview_where_view WHERE age = 2",
ImmutableMultiset.builder()
.addCopies(GET_TABLE, 3)
.addCopies(GET_TABLE, 6)
.build());
}
finally {
Expand All @@ -256,7 +254,7 @@ public void testSelectFromMaterializedViewWithFilter()
}
}

@Test(enabled = false)
@Test
public void testRefreshMaterializedView()
{
try {
Expand All @@ -265,7 +263,8 @@ public void testRefreshMaterializedView()

assertGlueMetastoreApiInvocations("REFRESH MATERIALIZED VIEW test_refresh_mview_view",
ImmutableMultiset.builder()
.addCopies(GET_TABLE, 5)
.addCopies(GET_TABLE, 12)
.addCopies(UPDATE_TABLE, 2)
.build());
}
finally {
Expand Down

0 comments on commit 79dc367

Please sign in to comment.