risingwavelabs/risingwave · error

unsupported Iceberg file scan task type: {:?}

Error message

unsupported Iceberg file scan task type: {:?}

What it means

`IcebergFileScanTask::from_tasks` maps a Vec of `FileScanTask`s into an internal task variant based on the `IcebergScanType`. Only DataScan, EqualityDeleteScan, and PositionDeleteScan are supported; any other scan type has no representation and bails with this error naming the unsupported type.

Source

Thrown at src/connector/src/source/iceberg/planner.rs:633

impl IcebergFileScanTask {
    pub fn scan_type(&self) -> IcebergScanType {
        match self {
            IcebergFileScanTask::Data(_) => IcebergScanType::DataScan,
            IcebergFileScanTask::EqualityDelete(_) => IcebergScanType::EqualityDeleteScan,
            IcebergFileScanTask::PositionDelete(_) => IcebergScanType::PositionDeleteScan,
        }
    }

    pub fn from_tasks(
        scan_type: IcebergScanType,
        tasks: Vec<FileScanTask>,
    ) -> ConnectorResult<Self> {
        match scan_type {
            IcebergScanType::DataScan => Ok(IcebergFileScanTask::Data(tasks)),
            IcebergScanType::EqualityDeleteScan => Ok(IcebergFileScanTask::EqualityDelete(tasks)),
            IcebergScanType::PositionDeleteScan => Ok(IcebergFileScanTask::PositionDelete(tasks)),
            _ => {
                bail!("unsupported Iceberg file scan task type: {:?}", scan_type)
            }
        }
    }

    pub fn into_tasks(self) -> Vec<FileScanTask> {
        match self {
            IcebergFileScanTask::Data(tasks)
            | IcebergFileScanTask::EqualityDelete(tasks)
            | IcebergFileScanTask::PositionDelete(tasks) => tasks,
        }
    }
}

impl IcebergScanOpts {
    pub fn new(
        chunk_size: usize,
        need_seq_num: bool,
        need_file_path_and_pos: bool,

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Check the computed `IcebergScanType` and why it is not one of the three supported variants.
  2. Pin/align the iceberg-rust crate version so no unmapped variants are produced, or add a match arm for the new variant.
  3. Ensure table writes only use supported delete formats (equality or position deletes) handled by the planner.
  4. Add a debug log/dump of scan_type at planning time to identify the producer of the unsupported value.
Defensive patterns

Strategy: validation

Validate before calling

match scan_type {
    IcebergScanType::DataScan | IcebergScanType::EqualityDeleteScan | IcebergScanType::PositionDeleteScan => {},
    other => return Err(format!("unsupported scan type {:?}", other)),
}

Type guard

fn is_supported(t: &IcebergScanType) -> bool {
    matches!(t, IcebergScanType::DataScan | IcebergScanType::EqualityDeleteScan | IcebergScanType::PositionDeleteScan)
}

Try / catch

match from_tasks(scan_type, tasks) {
    Err(e) if e.to_string().contains("unsupported Iceberg file scan task type") => {
        // downgrade/align iceberg-rust version or add a mapping
    }
    r => r,
}

Prevention

When it happens

Trigger: Calling `from_tasks` with a scan_type such as a position-delete variant or a future/unknown `IcebergScanType` enum value added by the iceberg-rust dependency that RisingWave's planner has no mapping for.

Common situations: Dependency upgrade introducing a new IcebergScanType variant; misconfigured source causing a delete-file scan on a table where only position deletes exist but the planner selected an unmapped type; internal planner bug selecting the wrong scan type.

Related errors


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