{"record":{"id":"b146402cd0cd39a2","repo":"risingwavelabs/risingwave","slug":"backfill-order-strategy","errorCode":null,"errorMessage":"backfill order strategy","messagePattern":"backfill order strategy","errorType":"validation","errorClass":"ParserError","httpStatus":null,"severity":"error","filePath":"src/sqlparser/src/parser.rs","lineNumber":4331,"sourceCode":"            )\n            .map(|list: Vec<SetVariableValueSingle>| {\n                if list.len() == 1 {\n                    SetVariableValue::Single(list[0].clone())\n                } else {\n                    SetVariableValue::List(list)\n                }\n            }),\n        ))\n        .parse_next(self)\n    }\n\n    fn parse_backfill_order_strategy(&mut self) -> ModalResult<BackfillOrderStrategy> {\n        alt((\n            Keyword::DEFAULT.value(BackfillOrderStrategy::Default),\n            Keyword::NONE.value(BackfillOrderStrategy::None),\n            Keyword::AUTO.value(BackfillOrderStrategy::Auto),\n            Self::parse_fixed_backfill_order.map(BackfillOrderStrategy::Fixed),\n            fail.expect(\"backfill order strategy\"),\n        ))\n        .parse_next(self)\n    }\n\n    fn parse_fixed_backfill_order(&mut self) -> ModalResult<Vec<(ObjectName, ObjectName)>> {\n        self.expect_word(\"FIXED\")?;\n        self.expect_token(&Token::LParen)?;\n        let edges = separated(\n            0..,\n            separated_pair(\n                Self::parse_object_name,\n                Token::Op(\"->\".to_owned()),\n                Self::parse_object_name,\n            ),\n            Token::Comma,\n        )\n        .parse_next(self)?;\n        self.expect_token(&Token::RParen)?;","sourceCodeStart":4313,"sourceCodeEnd":4349,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/sqlparser/src/parser.rs#L4313-L4349","documentation":"Raised by `parse_backfill_order_strategy` when parsing a backfill order strategy specification (RisingWave-specific ALTER/CREATE syntax). The parser accepts DEFAULT, NONE, AUTO, or FIXED (<table pairs>); any other token fails and produces 'expected backfill order strategy'. It indicates the strategy keyword clause is missing or malformed.","triggerScenarios":"Parsing a statement with a `backfill order` clause whose strategy token is misspelled or missing, e.g. `BACKFILL ORDER BY ...` instead of `BACKFILL ORDER FIXED (...)`, or an empty clause.","commonSituations":"Hand-written RisingWave DDL with a typo in FIXED/DEFAULT/NONE/AUTO; older SQL scripts using a backfill syntax from a different RisingWave version; copy-paste from documentation of another feature.","solutions":["Use one of the supported strategies: DEFAULT, NONE, AUTO, or FIXED `(<table> AS <table>, ...)`.","If using FIXED, verify the FIXED keyword and the parenthesized table-pair list follow exactly.","Check the RisingWave version's supported backfill order syntax and update the DDL."],"exampleFix":"// before\nALTER TABLE t BACKFILL ORDER BY a;\n// after\nALTER TABLE t BACKFILL ORDER FIXED (src AS t);","handlingStrategy":"validation","validationCode":"const STRATEGIES = new Set(['DEFAULT','NONE','AUTO']);\nfunction validBackfillStrategy(clause) { return STRATEGIES.has(clause.toUpperCase()) || /^FIXED\\s*\\(/i.test(clause); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy backfill order DDL from the matching RisingWave version's docs.","Verify FIXED clauses include the parenthesized table-pair list.","Validate DDL with the parser in CI."],"tags":["sql","parser","risingwave","ddl","syntax"],"backgroundTag":"invalid-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"}