Skip to content

Commit

Permalink
[apache#2927] Improvement(catalog-lakehouse-iceberg): Support more fi…
Browse files Browse the repository at this point in the history
…le formats in using clause when create iceberg tables
  • Loading branch information
caican00 committed Apr 13, 2024
1 parent 65cd4ff commit 6e8af10
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,7 @@ void testIcebergTablePropertiesWhenCreate() {
Table loadTable = tableCatalog.loadTable(tableIdentifier);
Assertions.assertFalse(loadTable.properties().containsKey(DEFAULT_FILE_FORMAT));

tableCatalog.dropTable(tableIdentifier);
properties.put(DEFAULT_FILE_FORMAT, "iceberg");
createdTable =
tableCatalog.createTable(
Expand All @@ -1099,6 +1100,7 @@ void testIcebergTablePropertiesWhenCreate() {
loadTable = tableCatalog.loadTable(tableIdentifier);
Assertions.assertFalse(loadTable.properties().containsKey(DEFAULT_FILE_FORMAT));

tableCatalog.dropTable(tableIdentifier);
properties.put(DEFAULT_FILE_FORMAT, "parquet");
createdTable =
tableCatalog.createTable(
Expand All @@ -1113,6 +1115,7 @@ void testIcebergTablePropertiesWhenCreate() {
loadTable = tableCatalog.loadTable(tableIdentifier);
Assertions.assertEquals("parquet", loadTable.properties().get(DEFAULT_FILE_FORMAT));

tableCatalog.dropTable(tableIdentifier);
properties.put(DEFAULT_FILE_FORMAT, "orc");
createdTable =
tableCatalog.createTable(
Expand All @@ -1127,6 +1130,7 @@ void testIcebergTablePropertiesWhenCreate() {
loadTable = tableCatalog.loadTable(tableIdentifier);
Assertions.assertEquals("orc", loadTable.properties().get(DEFAULT_FILE_FORMAT));

tableCatalog.dropTable(tableIdentifier);
properties.put(DEFAULT_FILE_FORMAT, "avro");
createdTable =
tableCatalog.createTable(
Expand All @@ -1141,6 +1145,7 @@ void testIcebergTablePropertiesWhenCreate() {
loadTable = tableCatalog.loadTable(tableIdentifier);
Assertions.assertEquals("avro", loadTable.properties().get(DEFAULT_FILE_FORMAT));

tableCatalog.dropTable(tableIdentifier);
properties.put(DEFAULT_FILE_FORMAT, "text");
Assertions.assertThrows(
IllegalArgumentException.class,
Expand Down

0 comments on commit 6e8af10

Please sign in to comment.