You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "roryqi (via GitHub)" <gi...@apache.org> on 2026/06/01 04:16:23 UTC
[PR] [#11296] test(iceberg): Cover JDBC parent namespace drop with child [gravitino]
roryqi opened a new pull request, #11311:
URL: https://github.com/apache/gravitino/pull/11311
### What changes were proposed in this pull request?
Add a JDBC catalog regression test that creates a parent namespace and a child namespace, then verifies dropping the parent namespace fails with `NamespaceNotEmptyException` and both namespaces remain.
### Why are the changes needed?
This documents the current Iceberg JDBC catalog behavior discussed in #11296: JDBC already rejects dropping a parent namespace while child namespaces exist.
@danhuawang could you take a look and confirm whether this matches your reproduction environment?
Related: #11296
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- `git diff --check`
- `./gradlew :iceberg:iceberg-common:test --tests org.apache.iceberg.jdbc.TestJdbcCatalogWithMetadataLocationSupport.testDropParentNamespaceWithChildFails -PskipITs`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11311:
URL: https://github.com/apache/gravitino/pull/11311#issuecomment-4590020019
<!-- coverage-report -->
### Code Coverage Report
|Overall Project|66.73%|:green_circle:|
|:-|:-|:-:|
|Files changed|No Java source files changed|-|
<br>
|Module|Coverage||
|:-|:-|:-:|
|aliyun|1.72%|:red_circle:|
|api|46.82%|:green_circle:|
|authorization-common|85.96%|:green_circle:|
|aws|3.66%|:red_circle:|
|azure|2.47%|:red_circle:|
|catalog-common|10.04%|:red_circle:|
|catalog-fileset|80.33%|:green_circle:|
|catalog-glue|66.08%|:green_circle:|
|catalog-hive|79.55%|:green_circle:|
|catalog-jdbc-clickhouse|80.02%|:green_circle:|
|catalog-jdbc-common|45.31%|:green_circle:|
|catalog-jdbc-doris|80.28%|:green_circle:|
|catalog-jdbc-hologres|54.03%|:green_circle:|
|catalog-jdbc-mysql|79.23%|:green_circle:|
|catalog-jdbc-oceanbase|78.38%|:green_circle:|
|catalog-jdbc-postgresql|82.29%|:green_circle:|
|catalog-jdbc-starrocks|78.51%|:green_circle:|
|catalog-kafka|77.01%|:green_circle:|
|catalog-lakehouse-generic|44.89%|:green_circle:|
|catalog-lakehouse-hudi|79.1%|:green_circle:|
|catalog-lakehouse-iceberg|85.73%|:green_circle:|
|catalog-lakehouse-paimon|79.29%|:green_circle:|
|catalog-model|77.72%|:green_circle:|
|cli|44.51%|:green_circle:|
|client-java|77.91%|:green_circle:|
|common|49.99%|:green_circle:|
|core|82.42%|:green_circle:|
|filesystem-hadoop3|76.97%|:green_circle:|
|flink|0.0%|:red_circle:|
|flink-common|41.2%|:green_circle:|
|flink-runtime|0.0%|:red_circle:|
|gcp|14.12%|:red_circle:|
|hadoop-common|10.39%|:red_circle:|
|hive-metastore-common|53.26%|:green_circle:|
|iceberg-common|56.71%|:green_circle:|
|iceberg-rest-server|72.01%|:green_circle:|
|idp-basic|85.99%|:green_circle:|
|integration-test-common|0.0%|:red_circle:|
|jobs|66.17%|:green_circle:|
|lance-common|20.83%|:red_circle:|
|lance-rest-server|60.27%|:green_circle:|
|lineage|53.02%|:green_circle:|
|optimizer|82.87%|:green_circle:|
|optimizer-api|21.95%|:red_circle:|
|server|85.73%|:green_circle:|
|server-common|73.66%|:green_circle:|
|spark|32.79%|:red_circle:|
|spark-common|39.75%|:red_circle:|
|trino-connector|39.44%|:red_circle:|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): Cover JDBC parent namespace drop with child [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi closed pull request #11311: [#11296] test(iceberg): Cover JDBC parent namespace drop with child
URL: https://github.com/apache/gravitino/pull/11311
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "danhuawang (via GitHub)" <gi...@apache.org>.
danhuawang commented on code in PR #11311:
URL: https://github.com/apache/gravitino/pull/11311#discussion_r3332787450
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/HierarchicalSchemaAuthorizationIT.java:
##########
@@ -327,4 +328,19 @@ public void testListSchemasUnderParentReturnsChildren() {
assertTrue(children.contains("P:Q:R"), "listSchemas(\"P:Q\") should include P:Q:R");
assertTrue(children.contains("P:Q:S"), "listSchemas(\"P:Q\") should include P:Q:S");
}
+
+ @Test
+ @Order(10)
+ public void testDropParentHierarchicalSchemaWithChildFails() {
+ Catalog catalog = client.loadMetalake(METALAKE).loadCatalog(CATALOG);
+ String parent = "DROP_PARENT";
+ String child = "DROP_PARENT:CHILD";
+
+ catalog.asSchemas().createSchema(child, "child schema", new HashMap<>());
Review Comment:
How about the test if we create schema as following:
```
catalog.asSchemas().createSchema(parent, "parent schema", new HashMap<>());
catalog.asSchemas().createSchema(child, "child schema", new HashMap<>());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi commented on code in PR #11311:
URL: https://github.com/apache/gravitino/pull/11311#discussion_r3332959635
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/HierarchicalSchemaAuthorizationIT.java:
##########
@@ -327,4 +328,19 @@ public void testListSchemasUnderParentReturnsChildren() {
assertTrue(children.contains("P:Q:R"), "listSchemas(\"P:Q\") should include P:Q:R");
assertTrue(children.contains("P:Q:S"), "listSchemas(\"P:Q\") should include P:Q:S");
}
+
+ @Test
+ @Order(10)
+ public void testDropParentHierarchicalSchemaWithChildFails() {
+ Catalog catalog = client.loadMetalake(METALAKE).loadCatalog(CATALOG);
+ String parent = "DROP_PARENT";
+ String child = "DROP_PARENT:CHILD";
+
+ catalog.asSchemas().createSchema(child, "child schema", new HashMap<>());
Review Comment:
Fixed by explicitly creating the parent schema before creating the child schema in this IT. Verified with:
`./gradlew :clients:client-java:test --tests org.apache.gravitino.client.integration.test.authorization.HierarchicalSchemaAuthorizationIT.testDropParentHierarchicalSchemaWithChildFails -PskipTests -PskipDockerTests=false`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "danhuawang (via GitHub)" <gi...@apache.org>.
danhuawang commented on code in PR #11311:
URL: https://github.com/apache/gravitino/pull/11311#discussion_r3333078445
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/HierarchicalSchemaAuthorizationIT.java:
##########
Review Comment:
I created catalog with following property:
```
--arg uri "jdbc:postgresql://${pg_host}:5432/gravitino" \
--arg pgUser "gravitino" \
--arg pgPass "gravitino" \
--arg warehouse "file:///tmp/iceberg-warehouse" \
'{
name:"catalog_1",
type:"RELATIONAL",
provider:"lakehouse-iceberg",
comment:"IRC default catalog (seeded by setup-kind-env.sh)",
properties:{
"catalog-backend":"jdbc",
"uri":$uri,
"jdbc-user":$pgUser,
"jdbc-password":$pgPass,
"jdbc-driver":"org.postgresql.Driver",
"jdbc-initialize":"true",
"jdbc-schema-version":"V1",
"warehouse":$warehouse
}
}'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "danhuawang (via GitHub)" <gi...@apache.org>.
danhuawang commented on code in PR #11311:
URL: https://github.com/apache/gravitino/pull/11311#discussion_r3333830600
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/HierarchicalSchemaAuthorizationIT.java:
##########
@@ -327,4 +328,19 @@ public void testListSchemasUnderParentReturnsChildren() {
assertTrue(children.contains("P:Q:R"), "listSchemas(\"P:Q\") should include P:Q:R");
assertTrue(children.contains("P:Q:S"), "listSchemas(\"P:Q\") should include P:Q:S");
}
+
+ @Test
+ @Order(10)
+ public void testDropParentHierarchicalSchemaWithChildFails() {
+ Catalog catalog = client.loadMetalake(METALAKE).loadCatalog(CATALOG);
+ String parent = "DROP_PARENT";
+ String child = "DROP_PARENT:CHILD";
+
+ catalog.asSchemas().createSchema(child, "child schema", new HashMap<>());
Review Comment:
I verify the case on the latest code, the issue is non-exsited.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi commented on PR #11311:
URL: https://github.com/apache/gravitino/pull/11311#issuecomment-4590020267
@danhuawang Could u take a look at this pull request?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#11296] test(iceberg): cover JDBC hierarchical schema drop [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi merged PR #11311:
URL: https://github.com/apache/gravitino/pull/11311
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org