Open mayankvadariya opened 3 days ago
@mayankvadariya can you provide additional details against which REST server this is running? Are there any reproducible tests in Trino itself to easily run & reproduce this?
I believe the issue is that a call to RESTUtil.decodeNamespace(parent)
is missing (similar to what has been added in https://github.com/apache/iceberg/pull/10858/files#diff-68e9dc9e0447ceb6ee81935a693797a7228775601f6366f50db42b3faef47ec3R291)
Currently I cannot reproduce this issue with the below Trino test:
--- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/rest/TestIcebergRestCatalogNestedNamespaceConnectorSmokeTest.java
+++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/rest/TestIcebergRestCatalogNestedNamespaceConnectorSmokeTest.java
@@ -13,6 +13,7 @@
*/
package io.trino.plugin.iceberg.catalog.rest;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import io.airlift.http.server.testing.TestingHttpServer;
import io.trino.filesystem.Location;
@@ -22,6 +23,7 @@ import io.trino.plugin.iceberg.SchemaInitializer;
import io.trino.plugin.iceberg.TestingIcebergPlugin;
import io.trino.plugin.tpch.TpchPlugin;
import io.trino.testing.DistributedQueryRunner;
+import io.trino.testing.MaterializedRow;
import io.trino.testing.QueryRunner;
import io.trino.testing.TestingConnectorBehavior;
import org.apache.iceberg.BaseTable;
@@ -149,6 +151,18 @@ final class TestIcebergRestCatalogNestedNamespaceConnectorSmokeTest
assertQueryFails("SELECT * FROM nested_namespace_disabled.\"level_1.level_2\".region", "Nested namespace is not enabled for this catalog");
}
+ @Test
+ void testNestedNamespace()
+ {
+ assertUpdate("CREATE SCHEMA iceberg.first");
+ assertUpdate("CREATE SCHEMA iceberg.\"first.second\"");
+ assertUpdate("CREATE SCHEMA iceberg.\"first.second.third\"");
+ assertThat(computeActual("show schemas from iceberg"))
+ .contains(new MaterializedRow(ImmutableList.of("first")),
+ new MaterializedRow(ImmutableList.of("first.second")),
+ new MaterializedRow(ImmutableList.of("first.second.third")));
+ }
+
I can reproduce this if I use Trino w/ Iceberg 1.7(commit ead6d9f
) connecting to an Iceberg REST catalog running Iceberg 1.6 (using the Tabular image). If I update the image to Iceberg 1.7, I don't get this error.
Polaris hits the same issue. The potential fix seems a good candidate for 1.7.1.
Apache Iceberg version
1.7.0 (latest release)
Query engine
Trino
Please describe the bug 🐞
Nested namespace request to Iceberg catalog server is sent incorrectly after upgrading Iceberg library from 1.6.1 to 1.7.0 in Trino. I've provided further analysis in https://github.com/apache/iceberg/pull/10858#issuecomment-2471482802 After https://github.com/trinodb/trino/commit/ead6d9f7dc7fe94321bcf452dc90f26eb0d3a2f5 commit(which bumps Iceberg from 1.61. to 1.7.0),
show schemas
fails in Iceberg connector with below error.Willingness to contribute