Skip to content

Commit

Permalink
[apache#4370]feat(iceberg): support view interface for Iceberg REST s…
Browse files Browse the repository at this point in the history
…erver
  • Loading branch information
theoryxu committed Sep 30, 2024
1 parent daa2945 commit 73e50fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public Map<String, String> getCatalogConfig() {
configMap.put(
IcebergConfig.ICEBERG_CONFIG_PREFIX + IcebergConfig.JDBC_INIT_TABLES.getKey(), "true");

configMap.put(IcebergConfig.ICEBERG_CONFIG_PREFIX + "jdbc.schema-version", "V1");

configMap.put(
IcebergConfig.ICEBERG_CONFIG_PREFIX + IcebergConfig.CATALOG_WAREHOUSE.getKey(),
GravitinoITUtils.genRandomName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ boolean catalogTypeNotMemory() {
return !catalogType.equals(IcebergCatalogBackend.MEMORY);
}

boolean catalogTypeNotHive() {
boolean isSupportsViewCatalog() {
return !catalogType.equals(IcebergCatalogBackend.HIVE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ void testRegisterTable() {
}

@Test
@EnabledIf("catalogTypeNotHive")
@EnabledIf("isSupportsViewCatalog")
void testCreateViewAndDisplayView() {
String originTableName = "iceberg_rest_table_test.create_table_for_view_1";
String viewName = "iceberg_rest_table_test.test_create_view";
Expand All @@ -582,7 +582,7 @@ void testCreateViewAndDisplayView() {
}

@Test
@EnabledIf("catalogTypeNotHive")
@EnabledIf("isSupportsViewCatalog")
void testViewProperties() {
String originTableName = "iceberg_rest_table_test.create_table_for_view_2";
String viewName = "iceberg_rest_table_test.test_create_view_with_properties";
Expand Down Expand Up @@ -622,7 +622,7 @@ void testViewProperties() {
}

@Test
@EnabledIf("catalogTypeNotHive")
@EnabledIf("isSupportsViewCatalog")
void testDropView() {
String originTableName = "iceberg_rest_table_test.create_table_for_view_3";
String viewName = "iceberg_rest_table_test.test_drop_view";
Expand All @@ -640,7 +640,7 @@ void testDropView() {
}

@Test
@EnabledIf("catalogTypeNotHive")
@EnabledIf("isSupportsViewCatalog")
void testReplaceView() {
String originTableName = "iceberg_rest_table_test.create_table_for_view_4";
String viewName = "iceberg_rest_table_test.test_replace_view";
Expand All @@ -662,7 +662,7 @@ void testReplaceView() {
}

@Test
@EnabledIf("catalogTypeNotHive")
@EnabledIf("isSupportsViewCatalog")
void testShowAvailableViews() {
String originTableName = "iceberg_rest_table_test.create_table_for_view_5";
String viewName1 = "iceberg_rest_table_test.show_available_views_1";
Expand All @@ -680,7 +680,7 @@ void testShowAvailableViews() {
}

@Test
@EnabledIf("catalogTypeNotHive")
@EnabledIf("isSupportsViewCatalog")
void testShowCreateStatementView() {
String originTableName = "iceberg_rest_table_test.create_table_for_view_6";
String viewName = "iceberg_rest_table_test.show_create_statement_view";
Expand Down

0 comments on commit 73e50fd

Please sign in to comment.