{"record":{"id":"fed8d67b0af8ef21","repo":"risingwavelabs/risingwave","slug":"invalid-value-for","errorCode":null,"errorMessage":"Invalid value for {}","messagePattern":"Invalid value for (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/optimizer/plan_node/generic/cdc_scan.rs","lineNumber":72,"sourceCode":"}\n\npub fn build_cdc_scan_options_with_options(\n    with_options: &WithOptions,\n    cdc_table_type: &ExternalCdcTableType,\n) -> Result<CdcScanOptions> {\n    // Update this after more CDC table type is supported for backfill v2.\n    let support_backfill_v2 = matches!(\n        cdc_table_type,\n        ExternalCdcTableType::Postgres | ExternalCdcTableType::Mock\n    );\n\n    // unspecified option will use default values\n    let mut scan_options = CdcScanOptions::default();\n\n    // disable backfill if 'snapshot=false'\n    if let Some(snapshot) = with_options.get(CDC_BACKFILL_ENABLE_KEY) {\n        scan_options.disable_backfill = !(bool::from_str(snapshot)\n            .map_err(|_| anyhow!(\"Invalid value for {}\", CDC_BACKFILL_ENABLE_KEY))?);\n    };\n\n    if let Some(snapshot_interval) = with_options.get(CDC_BACKFILL_SNAPSHOT_INTERVAL_KEY) {\n        scan_options.snapshot_barrier_interval = u32::from_str(snapshot_interval)\n            .map_err(|_| anyhow!(\"Invalid value for {}\", CDC_BACKFILL_SNAPSHOT_INTERVAL_KEY))?;\n    };\n\n    if let Some(snapshot_batch_size) = with_options.get(CDC_BACKFILL_SNAPSHOT_BATCH_SIZE_KEY) {\n        scan_options.snapshot_batch_size = u32::from_str(snapshot_batch_size)\n            .map_err(|_| anyhow!(\"Invalid value for {}\", CDC_BACKFILL_SNAPSHOT_BATCH_SIZE_KEY))?;\n    };\n\n    if support_backfill_v2 {\n        if let Some(backfill_parallelism) = with_options.get(CDC_BACKFILL_PARALLELISM) {\n            scan_options.backfill_parallelism = u32::from_str(backfill_parallelism)\n                .map_err(|_| anyhow!(\"Invalid value for {}\", CDC_BACKFILL_PARALLELISM))?;\n            if scan_options.backfill_parallelism > CDC_BACKFILL_MAX_PARALLELISM {\n                return Err(anyhow!(","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/optimizer/plan_node/generic/cdc_scan.rs#L54-L90","documentation":"When creating a CDC table, the 'backfill_enable' with-option must be parseable as a boolean ('true'/'false'). RisingWave calls bool::from_str on the option value, and when parsing fails it throws this error because the option value cannot be interpreted as a boolean. The option controls whether the CDC table backfills existing data from the upstream source on creation.","triggerScenarios":"CREATE TABLE ... WITH (connector = 'cdc-...', backfill_enable = 'yes') or any value other than exactly 'true' or 'false' (case-sensitive: 'True', '1', '0' also fail) passed to gen_create_table_plan_for_cdc_table.","commonSituations":"Using truthy strings like 'yes', 'on', '1', or capitalized 'True' in the WITH clause; quoting mistakes; copying options from other systems that accept 1/0.","solutions":["Set backfill_enable to exactly 'true' or 'false' in the WITH clause.","Remove the option entirely to use the default (backfill enabled).","Check for typos or stray whitespace/quotes in the option value."],"exampleFix":"// before\nCREATE TABLE t ... WITH (connector='cdc-postgres', backfill_enable = 'yes');\n// after\nCREATE TABLE t ... WITH (connector='cdc-postgres', backfill_enable = 'false');","handlingStrategy":"validation","validationCode":"// SQL-side check before DDL\nconst v = opts.backfill_enable;\nif (v !== undefined && v !== 'true' && v !== 'false') {\n  throw new Error(`backfill_enable must be 'true' or 'false', got: ${v}`);\n}","typeGuard":"const isRwBool = (s: unknown): s is 'true' | 'false' => s === 'true' || s === 'false';","tryCatchPattern":null,"preventionTips":["Only ever emit literal 'true'/'false' strings for RisingWave boolean with-options.","Do not map language booleans via String(true) without lowercasing.","Keep a shared constant list of validated option values in your deployment tooling."],"tags":["risingwave","sql","cdc","invalid-boolean"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}