{"record":{"id":"846e891a075d25c8","repo":"risingwavelabs/risingwave","slug":"column-not-found-in-backfill-table","errorCode":null,"errorMessage":"`{}` column not found in backfill table","messagePattern":"`(.+?)` column not found in backfill table","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/optimizer/rule/table_function_to_internal_backfill_progress.rs","lineNumber":193,"sourceCode":"struct BackfillInfo {\n    job_id: JobId,\n    fragment_id: FragmentId,\n    table_id: TableId,\n    row_count_column_index: usize,\n    epoch_column_index: Option<usize>,\n}\n\nimpl BackfillInfo {\n    fn new(table: &TableCatalog) -> anyhow::Result<Self> {\n        let Some(job_id) = table.job_id else {\n            bail!(\"`job_id` column not found in backfill table\");\n        };\n        let Some(row_count_column_index) = table\n            .columns\n            .iter()\n            .position(|c| c.name() == StreamTableScan::ROW_COUNT_COLUMN_NAME)\n        else {\n            bail!(\n                \"`{}` column not found in backfill table\",\n                StreamTableScan::ROW_COUNT_COLUMN_NAME\n            );\n        };\n        let epoch_column_index = table\n            .columns\n            .iter()\n            .position(|c| c.name() == StreamTableScan::EPOCH_COLUMN_NAME);\n        let fragment_id = table.fragment_id;\n        let table_id = table.id;\n\n        Ok(Self {\n            job_id,\n            fragment_id,\n            table_id,\n            row_count_column_index,\n            epoch_column_index,\n        })","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/optimizer/rule/table_function_to_internal_backfill_progress.rs#L175-L211","documentation":"`BackfillInfo::new` locates the internal row-count column (`StreamTableScan::ROW_COUNT_COLUMN_NAME`) in the backfill table's schema. If the column is absent, it bails naming the missing column, since progress computation depends on it.","triggerScenarios":"Same rule path as error 1443: the internal backfill TableCatalog's `columns` do not include the row-count column, so `position(...)` returns None.","commonSituations":"Internal table schema drift between versions, or querying a non-backfill internal table that lacks the synthetic row-count column.","solutions":["Ensure the target is the current internal backfill table with the row-count column (check its schema).","Upgrade to a version where the internal table schema matches what the rule expects.","Recreate the backfilling object to regenerate the internal table.","Use the documented progress-view API instead of the internal table function."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check the internal table schema contains the row-count column before use\n-- SELECT * FROM <internal_backfill_table> LIMIT 0; verify column present","typeGuard":null,"tryCatchPattern":"match BackfillInfo::new(&table) {\n    Ok(info) => /* proceed */,\n    Err(e) => eprintln!(\"internal backfill schema mismatch: {e:#}\"),\n}","preventionTips":["Match RisingWave version between catalog snapshots and query engine","Inspect internal table columns before depending on them","Prefer documented progress views over internal tables"],"tags":["rust","optimizer","backfill","schema"],"backgroundTag":"schema-validation-failed","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"}