databendlabs/databend · error · InvalidInput

disable_list_batch should be `TRUE` or `FALSE`, parse error…

Error message

disable_list_batch should be `TRUE` or `FALSE`, parse error with: {:?}

What it means

For webhdfs:// locations, the 'disable_list_batch' connection option is parsed as a bool (default true when absent). Any string other than case-insensitive 'true'/'false' causes this InvalidInput error wrapping the ParseBoolError.

Solutions

  1. Use 'true' or 'false' (case-insensitive) as the value.
  2. Remove the option to take the default (list batching disabled).
  3. Trim whitespace/quotes if the value was copied from a config file.

Example fix

// before
CONNECTION = (disable_list_batch = '0');
// after
CONNECTION = (disable_list_batch = 'true');
Defensive patterns

Strategy: validation

Validate before calling

// Rust
fn is_valid_bool_opt(v: &str) -> bool { matches!(v.to_lowercase().as_str(), "true" | "false") }
// validate disable_list_batch before use

Prevention

When it happens

Trigger: CONNECTION = (disable_list_batch = '0') or 'enabled' or 'Y' on a webhdfs:// location during stage creation or COPY.

Common situations: Numeric truthiness habits from other systems; YAML/JSON-style booleans pasted as strings; environment-specific templates using 'on'/'off'.

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 databendlabs/databend@288d84d76e (2026-09-11). Data as JSON: /api/errors/de2666b76e202380. Report an issue: GitHub.

Appendix: source

Thrown at src/query/sql/src/planner/binder/location.rs:433

            Error::new(
                ErrorKind::InvalidInput,
                format!(
                    "HTTPS should be `TRUE` or `FALSE`, parse error with: {:?}",
                    e,
                ),
            )
        })?;
    let prefix = if is_https { "https" } else { "http" };
    let endpoint_url = format!("{prefix}://{}", l.name);

    let delegation = l.connection.get("delegation").cloned().unwrap_or_default();
    let disable_list_batch = l
        .connection
        .get("disable_list_batch")
        .map(|v| v.to_lowercase().parse::<bool>())
        .unwrap_or(Ok(true))
        .map_err(|e| {
            Error::new(
                ErrorKind::InvalidInput,
                format!(
                    "disable_list_batch should be `TRUE` or `FALSE`, parse error with: {:?}",
                    e,
                ),
            )
        })?;
    let user_name = l.connection.get("user_name").cloned().unwrap_or_default();

    let sp = StorageParams::Webhdfs(StorageWebhdfsConfig {
        endpoint_url,
        root,
        delegation,
        disable_list_batch,
        user_name,
        network_config: None,
    });

View on GitHub (pinned to 288d84d76e)