risingwavelabs/risingwave · error

ALTER TABLE REFRESH SCHEMA is not supported for iceberg tabl

Error message

ALTER TABLE REFRESH SCHEMA is not supported for iceberg table: {}.{}

What it means

`ALTER TABLE ... REFRESH SCHEMA` is rejected for Iceberg tables. The command exists for tables with auto schema change to reconcile the RisingWave schema with the external store, but it is explicitly unsupported on Iceberg-backed tables where the sink handles refresh automatically or not at all.

Source

Thrown at src/frontend/src/handler/mod.rs:1788

                table_name
            );
        }
        AlterTableOperation::SetParallelism { .. } => {
            bail!(
                "ALTER TABLE SET PARALLELISM is not supported for iceberg table: {}.{}",
                schema_name,
                table_name
            );
        }
        AlterTableOperation::SetBackfillParallelism { .. } => {
            bail!(
                "ALTER TABLE SET BACKFILL PARALLELISM is not supported for iceberg table: {}.{}",
                schema_name,
                table_name
            );
        }
        AlterTableOperation::RefreshSchema => {
            bail!(
                "ALTER TABLE REFRESH SCHEMA is not supported for iceberg table: {}.{}",
                schema_name,
                table_name
            );
        }
        AlterTableOperation::AlterRateLimit(rate_limit)
            if rate_limit.rate_limit_type == AlterRateLimitType::Source =>
        {
            bail!(
                "ALTER TABLE SET SOURCE RATE LIMIT is not supported for iceberg table: {}.{}",
                schema_name,
                table_name
            );
        }
        AlterTableOperation::AlterWatermark { .. } => {
            bail!(
                "ALTER TABLE ALTER WATERMARK is not supported for iceberg table: {}.{}",
                schema_name,

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Let the auto-refresh-schema sink propagate schema changes automatically; verify the sink was created with that option.
  2. Recreate the sink with auto schema-change support, then let it refresh instead of issuing REFRESH SCHEMA.
  3. Recreate the table and sink with the correct schema if drift persists.

Example fix

// before
ALTER TABLE iceberg_t REFRESH SCHEMA;
// after
-- ensure sink created with auto_refresh_schema = true; changes propagate automatically
Defensive patterns

Strategy: validation

Validate before calling

-- Do not issue REFRESH SCHEMA on iceberg tables
SELECT relation_kind FROM rw_catalog.rw_relations WHERE name = 't';
-- rely on the auto-refresh-schema sink instead

Type guard

fn is_refresh_schema(op: &AlterTableOperation) -> bool {
    matches!(op, AlterTableOperation::RefreshSchema)
}

Try / catch

match client.alter_table_refresh_schema(table).await {
    Err(e) if e.message().contains("REFRESH SCHEMA is not supported for iceberg") => {
        // ensure sink has auto_refresh_schema; do not force refresh
    }
    other => other?,
}

Prevention

When it happens

Trigger: Executing `ALTER TABLE <iceberg_table> REFRESH SCHEMA` on a table backed by an Iceberg sink.

Common situations: Schema drift between RisingWave and Iceberg where a developer tries to force a refresh; runbooks written for other external-table types (e.g. other connectors) applied to Iceberg.

Related errors


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