risingwavelabs/risingwave · error
`{option}` is not supported for '{}' compaction type
Error message
`{option}` is not supported for '{}' compaction type What it means
Each iceberg compaction type only supports a subset of tuning options (e.g. small_files_threshold_mb is only valid for certain types). Setting an option unsupported by the configured compaction.type is rejected at validation time.
Source
Thrown at src/connector/src/sink/iceberg/mod.rs:141
return Ok(());
};
let unsupported_option = match compaction_type {
// Auto uses both selection thresholds.
CompactionType::Auto => None,
// Keep accepting strategy-specific thresholds that Full ignores.
CompactionType::Full => None,
CompactionType::SmallFiles => config
.delete_files_count_threshold
.is_some()
.then_some(COMPACTION_DELETE_FILES_COUNT_THRESHOLD),
CompactionType::FilesWithDelete => config
.small_files_threshold_mb
.is_some()
.then_some(COMPACTION_SMALL_FILES_THRESHOLD_MB),
};
if let Some(option) = unsupported_option {
bail!(
"`{option}` is not supported for '{}' compaction type",
compaction_type.as_str()
);
}
Ok(())
}
impl IcebergSink {
pub async fn create_and_validate_table(&self) -> Result<Table> {
create_and_validate_table_impl(&self.config, &self.param).await
}
/// Returns `true` if this call created the table, `false` if it already existed.
pub async fn create_table_if_not_exists(&self) -> Result<bool> {
create_table_if_not_exists_impl(&self.config, &self.param).await
}
View on GitHub (pinned to 6469eb736d)
Solutions
- Remove the unsupported option (e.g. small_files_threshold_mb) or change compaction.type to one that supports it
- Check which options are valid for the chosen compaction type in the docs
- After an ALTER of compaction.type, reset incompatible options
Example fix
// before WITH (connector='iceberg', compaction.type='files-with-delete', small_files_threshold_mb=128) // after WITH (connector='iceberg', compaction.type='full', small_files_threshold_mb=128)
Defensive patterns
Strategy: validation
Validate before calling
let supported: HashSet<&str> = match compaction_type {
"full" => ["small_files_threshold_mb"].into(),
"files-with-delete" => [].into(),
_ => return Ok(()),
};
for opt in options.keys() {
if !supported.contains(opt.as_str()) { return Err(format!("{opt} unsupported for {compaction_type}")); }
} Prevention
- Check docs for option support per compaction type
- Reset incompatible options when ALTERing compaction.type
- Lint sink WITH clauses in CI/SQL review
When it happens
Trigger: Creating or altering an iceberg sink where an option like small_files_threshold_mb is set but the compaction.type in effect does not accept it.
Common situations: Mixing example configs across compaction types; changing compaction.type via ALTER while legacy options remain set.
Related errors
- `compaction.type` must not be set when `write_mode` is `copy
- `compaction-interval-sec` must be greater than 0 when `enabl
- `compaction.max_snapshots_num` must be greater than 0, got:
- `compaction.target_file_size_mb` must be greater than 0
- `compaction_interval_sec` must be greater than 0
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/df072a2615e2b005.
Report an issue: GitHub.