risingwavelabs/risingwave · error · SinkError::Iceberg

Unsupported sink schema change op in iceberg sink: {:?}

Error message

Unsupported sink schema change op in iceberg sink: {:?}

What it means

check_schema_change_applied only understands AddColumns and (in this match) a limited set of sink schema-change ops; any other SinkSchemaChange op (e.g., drop or type-change) reaches the `_` arm and is rejected. It is a guard ensuring the sink never silently ignores schema-change semantics it cannot verify.

Source

Thrown at src/connector/src/sink/iceberg/commit.rs:903

                    .collect::<Result<_>>()?;

                let mut expected_after_change = original_arrow_fields;
                expected_after_change.extend(add_arrow_fields);
                expected_after_change
            }
            Some(risingwave_pb::stream_plan::sink_schema_change::Op::DropColumns(
                drop_columns_op,
            )) => original_arrow_fields
                .into_iter()
                .filter(|field| {
                    !drop_columns_op
                        .column_names
                        .iter()
                        .any(|name| name == field.name())
                })
                .collect_vec(),
            _ => {
                return Err(SinkError::Iceberg(anyhow!(
                    "Unsupported sink schema change op in iceberg sink: {:?}",
                    schema_change.op
                )));
            }
        };

        // If current schema equals the changed schema, then schema change is applied.
        if schema_matches(&expected_after_change) {
            tracing::debug!(
                "Current iceberg schema matches changed schema ({} columns); schema change already applied",
                expected_after_change.len()
            );
            return Ok(true);
        }

        Err(SinkError::Iceberg(anyhow!(
            "Current iceberg schema does not match either original_schema ({} cols) or changed schema; cannot determine whether schema change is applied",
            schema_change.original_schema.len()

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Only issue supported schema changes (add column) on upstream tables of Iceberg sinks.
  2. If drop column is needed, recreate the sink or manually align the Iceberg table schema.
  3. Upgrade RisingWave if a newer version supports the desired op for Iceberg sinks.
  4. Adjust the schema-change plan generation so unsupported ops are filtered out before reaching the sink.
Defensive patterns

Strategy: validation

Validate before calling

// Restrict DDL on upstream tables to supported ops:
// allowed: ADD COLUMN; not allowed: DROP/RENAME/ALTER TYPE on iceberg sinks

Prevention

When it happens

Trigger: A downstream DDL that produced a SinkSchemaChange with an op other than AddColumns/expected variants (e.g., DROP COLUMN, ALTER TYPE) flows into an Iceberg sink whose check_schema_change_applied doesn't handle it.

Common situations: Running `ALTER TABLE ... DROP COLUMN` on the upstream table feeding an Iceberg sink; schema registry/source emitting incompatible schema-change ops; RisingWave version where drop-column support isn't enabled for Iceberg sinks.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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