Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@
import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE;
import static io.trino.plugin.iceberg.IcebergTestUtils.checkOrcFileSorting;
import static io.trino.plugin.iceberg.IcebergTestUtils.checkParquetFileSorting;
import static io.trino.testing.TestingNames.randomNameSuffix;
import static java.lang.String.format;
import static org.apache.iceberg.FileFormat.PARQUET;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
import static org.junit.jupiter.api.Assumptions.abort;
import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS;

Expand Down Expand Up @@ -82,6 +84,7 @@ protected QueryRunner createQueryRunner()
.addIcebergProperty("iceberg.register-table-procedure.enabled", "true")
.addIcebergProperty("iceberg.writer-sort-buffer-size", "1MB")
.addIcebergProperty("iceberg.catalog.type", "rest")
.addIcebergProperty("iceberg.rest-catalog.nested-namespace-enabled", "true")
.addIcebergProperty("iceberg.rest-catalog.uri", polarisCatalog.restUri() + "/api/catalog")
.addIcebergProperty("iceberg.rest-catalog.warehouse", TestingPolarisCatalog.WAREHOUSE)
.addIcebergProperty("iceberg.rest-catalog.security", "OAUTH2")
Expand Down Expand Up @@ -147,6 +150,21 @@ protected void deleteDirectory(String location)
}
}

@Test
void testNestedNamespace()
{
String parentNamespace = "level1_" + randomNameSuffix();
String nestedNamespace = parentNamespace + ".level2_" + randomNameSuffix();

assertUpdate("CREATE SCHEMA " + parentNamespace);
assertUpdate("CREATE SCHEMA \"" + nestedNamespace + "\"");
assertThat(computeActual("SHOW SCHEMAS").getOnlyColumnAsSet())
.contains(parentNamespace, nestedNamespace);

assertUpdate("DROP SCHEMA \"" + nestedNamespace + "\"");
assertUpdate("DROP SCHEMA " + parentNamespace);
}

@Test
@Override
public void testMaterializedView()
Expand Down