risingwavelabs/risingwave · error · ParserError
backfill order strategy
Error message
backfill order strategy
What it means
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.
Source
Thrown at src/sqlparser/src/parser.rs:4331
)
.map(|list: Vec<SetVariableValueSingle>| {
if list.len() == 1 {
SetVariableValue::Single(list[0].clone())
} else {
SetVariableValue::List(list)
}
}),
))
.parse_next(self)
}
fn parse_backfill_order_strategy(&mut self) -> ModalResult<BackfillOrderStrategy> {
alt((
Keyword::DEFAULT.value(BackfillOrderStrategy::Default),
Keyword::NONE.value(BackfillOrderStrategy::None),
Keyword::AUTO.value(BackfillOrderStrategy::Auto),
Self::parse_fixed_backfill_order.map(BackfillOrderStrategy::Fixed),
fail.expect("backfill order strategy"),
))
.parse_next(self)
}
fn parse_fixed_backfill_order(&mut self) -> ModalResult<Vec<(ObjectName, ObjectName)>> {
self.expect_word("FIXED")?;
self.expect_token(&Token::LParen)?;
let edges = separated(
0..,
separated_pair(
Self::parse_object_name,
Token::Op("->".to_owned()),
Self::parse_object_name,
),
Token::Comma,
)
.parse_next(self)?;
self.expect_token(&Token::RParen)?;View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before ALTER TABLE t BACKFILL ORDER BY a; // after ALTER TABLE t BACKFILL ORDER FIXED (src AS t);
Defensive patterns
Strategy: validation
Validate before calling
const STRATEGIES = new Set(['DEFAULT','NONE','AUTO']);
function validBackfillStrategy(clause) { return STRATEGIES.has(clause.toUpperCase()) || /^FIXED\s*\(/i.test(clause); } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/b146402cd0cd39a2.
Report an issue: GitHub.