dbt-labs/dbt-core · error
Trino
Error message
Trino
What it means
A `todo!()` panic in `ColumnBuilder::build` (column_builder.rs:38) for the Trino adapter. No column-building strategy exists for Trino, so any schema-to-column conversion under a Trino adapter panics with the message 'Trino'.
Source
Thrown at crates/dbt-adapter/src/column/column_builder.rs:38
Self { adapter_type }
}
pub fn build(&self, field: &FieldRef, type_ops: &dyn TypeOps) -> AdapterResult<Column> {
use AdapterType::*;
match self.adapter_type {
Snowflake => Ok(Self::build_snowflake(field, type_ops)),
Bigquery => Ok(Self::build_bigquery(field, type_ops)),
Databricks | Spark => Ok(Self::build_databricks(field, type_ops)),
Redshift => Ok(Self::build_redshift(field, type_ops)),
Postgres | Salesforce | DuckDB | LakeCompute => {
Ok(Self::build_postgres_like(field, type_ops))
}
Fabric => Ok(Self::build_fabric(field, type_ops)),
ClickHouse => Self::build_clickhouse(field, type_ops),
Exasol => Ok(Self::build_exasol(field, type_ops)),
Starburst => todo!("Starburst"),
Athena => todo!("Athena"),
Trino => todo!("Trino"),
Dremio => todo!("Dremio"),
Oracle => todo!("Oracle"),
Datafusion => todo!("Datafusion"),
}
}
pub fn build_from_parts(
&self,
name: String,
dtype: String,
char_size: Option<u32>,
numeric_precision: Option<u64>,
numeric_scale: Option<u64>,
mode: Option<BigqueryColumnMode>,
) -> Column {
use AdapterType::*;
match self.adapter_type {
Postgres => Column::new(View on GitHub (pinned to 0267ce9170)
Solutions
- Use a supported adapter (e.g. Postgres-like or Exasol) for column schema workflows.
- Implement the Trino arm by sharing `build_postgres_like` with Starburst, since Trino types are Presto/ANSI-like.
- Replace the panic with a typed unsupported-adapter error for graceful handling.
Example fix
// before
Trino => todo!("Trino"),
// after
Trino | Starburst => Ok(Self::build_postgres_like(field, type_ops)), Defensive patterns
Strategy: type-guard
Validate before calling
if adapter == AdapterType::Trino {
return Err(anyhow!("Trino column building is not implemented yet"));
} Type guard
fn build_supported(t: AdapterType) -> bool {
matches!(t, Postgres | Salesforce | DuckDB | LakeCompute | Fabric | ClickHouse | Exasol)
} Try / catch
std::panic::catch_unwind(AssertUnwindSafe(|| builder.build(field, type_ops)))
.map_err(|_| anyhow!("column building unimplemented for Trino"))? Prevention
- Avoid Trino profiles for docs generate / catalog workflows until supported
- Implement Trino together with Starburst via build_postgres_like
- Add a compile-time exhaustive-match lint or test for new AdapterType variants
- Check the source dispatch table before assuming an adapter is schema-introspection ready
When it happens
Trigger: Any of the public callers of `build` — schema_to_columns, get_column_schema_from_query, update_node_columns — invoked with adapter type Trino, e.g. during catalog queries or result-set schema extraction.
Common situations: Using a Trino adapter profile with dbt docs generate or tests that introspect query schemas. Frequently paired with the neighboring Starburst arm (Trino and Starburst share lineage).
Related errors
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/c59ab6bbf5c9190b.
Report an issue: GitHub.