databendlabs/databend · error

unimplemented

Error message

unimplemented

What it means

`InspectType::from_name` maps system inspect table names to enum variants; only `iceberg_snapshot` and `iceberg_manifest` are recognized. Any other name hits `unimplemented!()` and panics, meaning that inspect table name is not supported by the Iceberg inspect layer.

Solutions

  1. Use only the supported inspect names: `iceberg_snapshot` and `iceberg_manifest`.
  2. Check spelling/case of the inspect table name against the supported list.
  3. Extend from_name's match to support the needed inspect type and implement it if you control the code.

Example fix

// before
_ => unimplemented!(),
// after
other => return Err(ErrorCode::Unimplemented(format!("inspect type not supported: {}", other))),
Defensive patterns

Strategy: type-guard

Validate before calling

const SUPPORTED_INSPECT: &[&str] = &["iceberg_snapshot", "iceberg_manifest"];
if !SUPPORTED_INSPECT.contains(&name) {
    return Err(anyhow::anyhow!("unsupported inspect table: {}", name));
}

Type guard

fn is_supported_inspect(name: &str) -> bool {
    matches!(name, "iceberg_snapshot" | "iceberg_manifest")
}

Try / catch

let inspect = InspectType::try_from_name(name)
    .unwrap_or_else(|e| { log::warn!("{}", e); InspectType::Snapshot });

Prevention

When it happens

Trigger: Querying an iceberg inspect table (e.g. `system.inspect$<name>` style lookup) whose name is not exactly `iceberg_snapshot` or `iceberg_manifest`, so the match falls to `_ => unimplemented!()`.

Common situations: Trying to inspect other Iceberg metadata tables (e.g. snapshot refs, partitions, history) that exist in upstream Iceberg but are not implemented in Databend; typos in the inspect table name.

Related errors


AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11). Data as JSON: /api/errors/82549a4a2ce169b2. Report an issue: GitHub.

Appendix: source

Thrown at src/query/storages/iceberg/src/iceberg_inspect.rs:342

                                    TableDataType::String,
                                    TableDataType::String,
                                ],
                            }
                            .wrap_nullable(),
                        )),
                    ),
                ];

                Arc::new(TableSchema::new(fields))
            }
        }
    }

    pub fn from_name(name: &str) -> InspectType {
        match name {
            "iceberg_snapshot" => InspectType::Snapshot,
            "iceberg_manifest" => InspectType::Manifest,
            _ => unimplemented!(),
        }
    }
}

View on GitHub (pinned to 288d84d76e)