risingwavelabs/risingwave · error

not yet implemented

Error message

not yet implemented

What it means

`JniCatalog::get_namespace` is declared as part of the iceberg `Catalog` trait but its body is `todo!()`, so any call panics with 'not yet implemented'. The functionality was simply never implemented for the JNI-backed catalog.

Source

Thrown at src/connector/src/connector_common/iceberg/jni_catalog.rs:207

                    &namespace_jstr)
                .with_context(|| format!("Failed to create namespace: {namespace}"))?;

                Ok(Namespace::new(namespace))
            })
        })
        .await
        .map_err(|e| {
            iceberg::Error::new(
                iceberg::ErrorKind::Unexpected,
                "Failed to create namespace.",
            )
            .with_source(e)
        })
    }

    /// Get a namespace information from the catalog.
    async fn get_namespace(&self, _namespace: &NamespaceIdent) -> iceberg::Result<Namespace> {
        todo!()
    }

    /// Check if namespace exists in catalog.
    async fn namespace_exists(&self, namespace: &NamespaceIdent) -> iceberg::Result<bool> {
        let inner = self.inner.clone();
        let namespace = namespace.clone();
        execute_blocking_jni(move || {
            execute_with_jni_env(inner.jvm, |env| {
                let namespace_str = namespace_to_string(&namespace);
                let namespace_jstr = env.new_string(&namespace_str).unwrap();

                let exists =
                    call_method!(env, inner.java_catalog.as_obj(), {boolean namespaceExists(String)},
                    &namespace_jstr)
                    .with_context(|| format!("Failed to check namespace exists: {namespace}"))?;

                Ok(exists)
            })

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Avoid features that call `get_namespace` on JNI-backed catalogs.
  2. Use `namespace_exists` or `list_namespaces` instead to obtain namespace information.
  3. Implement the method in jni_catalog.rs if you maintain the code (delegating to the Java catalog).
  4. Wait for upstream support of this trait method for JNI catalogs.

Example fix

// before
async fn get_namespace(&self, _namespace: &NamespaceIdent) -> iceberg::Result<Namespace> {
    todo!()
}
// after
async fn get_namespace(&self, namespace: &NamespaceIdent) -> iceberg::Result<Namespace> {
    // delegate to JVM and parse LoadNamespaceResponse, or return a clear unsupported error:
    Err(iceberg::Error::new(
        iceberg::ErrorKind::FeatureUnsupported,
        "get_namespace is not implemented for JNI catalog",
    ))
}
Defensive patterns

Strategy: type-guard

Type guard

// Guard against unimplemented capability before calling trait method
fn supports_get_namespace(c: &dyn Catalog) -> bool {
    // JNI-backed catalogs do not implement get_namespace
    !c.name().contains("Jni")
}

Try / catch

// In Rust, todo!() panics — use catch_unwind if you must call dynamically
let result = std::panic::catch_unwind(AssertUnwindSafe(|| {
    futures::executor::block_on(catalog.get_namespace(&ns))
}));

Prevention

When it happens

Trigger: Any code path that calls `get_namespace` on a JniCatalog instance, e.g. feature flags or queries that need to fetch namespace metadata/properties.

Common situations: Downstream tools or future RisingWave features invoking namespace metadata lookup on a JNI Iceberg catalog; users relying on Iceberg catalog inspection that calls this trait method.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/2529b556e17e402d. Report an issue: GitHub.