risingwavelabs/risingwave · error

invalid value for , expect true or false

Error message

invalid value for {}, expect true or false

What it means

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.

Solutions

  1. Set the option to `true` or `false` (case-insensitive, trimmed)
  2. Remove the option entirely to use the default (false)
  3. Quote the value properly in SQL so no stray characters are included

Example fix

-- before
WITH (...) FORMAT PLAIN ENCODE PARQUET (case.insensitive='yes')
-- after
WITH (...) FORMAT PLAIN ENCODE PARQUET (case.insensitive='true')
Defensive patterns

Strategy: validation

Validate before calling

const v = options["case.insensitive"];
if (v !== undefined && !["true","false"].includes(String(v).trim().toLowerCase())) throw new Error("case.insensitive must be true or false");

Prevention

When it happens

Trigger: Setting `case.insensitive` in a Parquet source's format_encode_options to something like `True ` (with odd chars), `yes`, `1`, or `truee`.

Common situations: Copy-pasting boolean conventions from other systems (yes/1/on); YAML/SQL quoting mistakes introducing whitespace or quotes; typos.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/cf4898e7173025c9. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/parser/config.rs:52

pub const PARQUET_CASE_INSENSITIVE_KEY: &str = "parquet.case_insensitive";

/// Note: this is created in `SourceReader::build_stream`
#[derive(Debug, Clone, Default)]
pub struct ParserConfig {
    pub common: CommonParserConfig,
    pub specific: SpecificParserConfig,
}

fn parse_parquet_case_insensitive_option(
    options_with_secret: &BTreeMap<String, String>,
) -> ConnectorResult<bool> {
    let value = options_with_secret.get(PARQUET_CASE_INSENSITIVE_KEY);
    let Some(value) = value else {
        return Ok(false);
    };
    let parsed = match value.trim().to_ascii_lowercase().parse::<bool>() {
        Ok(parsed) => parsed,
        Err(_) => bail!(
            "invalid value for {}, expect true or false",
            PARQUET_CASE_INSENSITIVE_KEY
        ),
    };
    Ok(parsed)
}

impl ParserConfig {
    pub fn get_config(self) -> (Vec<SourceColumnDesc>, SpecificParserConfig) {
        (self.common.rw_columns, self.specific)
    }
}

#[derive(Debug, Clone, Default)]
pub struct CommonParserConfig {
    /// Note: this is created by `SourceDescBuilder::builder`
    pub rw_columns: Vec<SourceColumnDesc>,
}

View on GitHub (pinned to 6469eb736d)