{"record":{"id":"cf4898e7173025c9","repo":"risingwavelabs/risingwave","slug":"invalid-value-for-expect-true-or-false","errorCode":null,"errorMessage":"invalid value for {}, expect true or false","messagePattern":"invalid value for (.+?), expect true or false","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/parser/config.rs","lineNumber":52,"sourceCode":"pub const PARQUET_CASE_INSENSITIVE_KEY: &str = \"parquet.case_insensitive\";\n\n/// Note: this is created in `SourceReader::build_stream`\n#[derive(Debug, Clone, Default)]\npub struct ParserConfig {\n    pub common: CommonParserConfig,\n    pub specific: SpecificParserConfig,\n}\n\nfn parse_parquet_case_insensitive_option(\n    options_with_secret: &BTreeMap<String, String>,\n) -> ConnectorResult<bool> {\n    let value = options_with_secret.get(PARQUET_CASE_INSENSITIVE_KEY);\n    let Some(value) = value else {\n        return Ok(false);\n    };\n    let parsed = match value.trim().to_ascii_lowercase().parse::<bool>() {\n        Ok(parsed) => parsed,\n        Err(_) => bail!(\n            \"invalid value for {}, expect true or false\",\n            PARQUET_CASE_INSENSITIVE_KEY\n        ),\n    };\n    Ok(parsed)\n}\n\nimpl ParserConfig {\n    pub fn get_config(self) -> (Vec<SourceColumnDesc>, SpecificParserConfig) {\n        (self.common.rw_columns, self.specific)\n    }\n}\n\n#[derive(Debug, Clone, Default)]\npub struct CommonParserConfig {\n    /// Note: this is created by `SourceDescBuilder::builder`\n    pub rw_columns: Vec<SourceColumnDesc>,\n}","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/parser/config.rs#L34-L70","documentation":"The optional `case.insensitive` option for Parquet sources, when present, must be the string true/false (trim + lowercase tolerated). Any other value fails the bool parse and triggers this error naming the option key.","triggerScenarios":"Setting `case.insensitive` in a Parquet source's format_encode_options to something like `True ` (with odd chars), `yes`, `1`, or `truee`.","commonSituations":"Copy-pasting boolean conventions from other systems (yes/1/on); YAML/SQL quoting mistakes introducing whitespace or quotes; typos.","solutions":["Set the option to `true` or `false` (case-insensitive, trimmed)","Remove the option entirely to use the default (false)","Quote the value properly in SQL so no stray characters are included"],"exampleFix":"-- before\nWITH (...) FORMAT PLAIN ENCODE PARQUET (case.insensitive='yes')\n-- after\nWITH (...) FORMAT PLAIN ENCODE PARQUET (case.insensitive='true')","handlingStrategy":"validation","validationCode":"const v = options[\"case.insensitive\"];\nif (v !== undefined && ![\"true\",\"false\"].includes(String(v).trim().toLowerCase())) throw new Error(\"case.insensitive must be true or false\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use literal 'true'/'false' for boolean source options","Review generated DDL for stray whitespace or quotes","Remove optional booleans entirely to accept defaults"],"tags":["parquet","config","boolean-parsing"],"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"}