{"record":{"id":"edd827a7e3b070ee","repo":"risingwavelabs/risingwave","slug":"unsupported-iceberg-file-scan-task-type","errorCode":null,"errorMessage":"unsupported Iceberg file scan task type: {:?}","messagePattern":"unsupported Iceberg file scan task type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/source/iceberg/planner.rs","lineNumber":633,"sourceCode":"impl IcebergFileScanTask {\n    pub fn scan_type(&self) -> IcebergScanType {\n        match self {\n            IcebergFileScanTask::Data(_) => IcebergScanType::DataScan,\n            IcebergFileScanTask::EqualityDelete(_) => IcebergScanType::EqualityDeleteScan,\n            IcebergFileScanTask::PositionDelete(_) => IcebergScanType::PositionDeleteScan,\n        }\n    }\n\n    pub fn from_tasks(\n        scan_type: IcebergScanType,\n        tasks: Vec<FileScanTask>,\n    ) -> ConnectorResult<Self> {\n        match scan_type {\n            IcebergScanType::DataScan => Ok(IcebergFileScanTask::Data(tasks)),\n            IcebergScanType::EqualityDeleteScan => Ok(IcebergFileScanTask::EqualityDelete(tasks)),\n            IcebergScanType::PositionDeleteScan => Ok(IcebergFileScanTask::PositionDelete(tasks)),\n            _ => {\n                bail!(\"unsupported Iceberg file scan task type: {:?}\", scan_type)\n            }\n        }\n    }\n\n    pub fn into_tasks(self) -> Vec<FileScanTask> {\n        match self {\n            IcebergFileScanTask::Data(tasks)\n            | IcebergFileScanTask::EqualityDelete(tasks)\n            | IcebergFileScanTask::PositionDelete(tasks) => tasks,\n        }\n    }\n}\n\nimpl IcebergScanOpts {\n    pub fn new(\n        chunk_size: usize,\n        need_seq_num: bool,\n        need_file_path_and_pos: bool,","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/iceberg/planner.rs#L615-L651","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the computed `IcebergScanType` and why it is not one of the three supported variants.","Pin/align the iceberg-rust crate version so no unmapped variants are produced, or add a match arm for the new variant.","Ensure table writes only use supported delete formats (equality or position deletes) handled by the planner.","Add a debug log/dump of scan_type at planning time to identify the producer of the unsupported value."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"match scan_type {\n    IcebergScanType::DataScan | IcebergScanType::EqualityDeleteScan | IcebergScanType::PositionDeleteScan => {},\n    other => return Err(format!(\"unsupported scan type {:?}\", other)),\n}","typeGuard":"fn is_supported(t: &IcebergScanType) -> bool {\n    matches!(t, IcebergScanType::DataScan | IcebergScanType::EqualityDeleteScan | IcebergScanType::PositionDeleteScan)\n}","tryCatchPattern":"match from_tasks(scan_type, tasks) {\n    Err(e) if e.to_string().contains(\"unsupported Iceberg file scan task type\") => {\n        // downgrade/align iceberg-rust version or add a mapping\n    }\n    r => r,\n}","preventionTips":["Pin iceberg-rust to a version whose ScanType variants are fully mapped","Add exhaustive match lint/CI check on IcebergScanType","Re-check enum mapping after every dependency upgrade"],"tags":["rust","iceberg","scan-planning","enum"],"backgroundTag":"unsupported-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}