databendlabs/databend · error · InvalidInput
HTTPS should be `TRUE` or `FALSE`, parse error with
Error message
HTTPS should be `TRUE` or `FALSE`, parse error with: {:?} What it means
For webhdfs:// locations, the 'https' connection option is parsed as a Rust bool via to_lowercase().parse::<bool>(). Only case-insensitive 'true'/'false' are accepted (default is true when absent); any other string produces this InvalidInput error wrapping the ParseBoolError.
Solutions
- Change the value to 'true' or 'false' (any letter case is accepted).
- Remove the option entirely to use the default (HTTPS enabled).
- Check for stray whitespace or non-ASCII characters inside the quoted value.
Example fix
// before CONNECTION = (https = 'yes'); // after CONNECTION = (https = 'false');
Defensive patterns
Strategy: validation
Validate before calling
// Rust
fn is_valid_bool_opt(v: &str) -> bool { matches!(v.to_lowercase().as_str(), "true" | "false") }
// check before submitting: https option must satisfy is_valid_bool_opt Prevention
- Use only 'true' or 'false' for boolean connection options.
- Never use 1/0, yes/no, or on/off.
- Trim whitespace from config values before quoting them in SQL.
When it happens
Trigger: CONNECTION = (https = 'yes') or (https = '1') or (https = 'on') on a webhdfs:// stage/COPY location.
Common situations: Users writing 'True' is fine (lowercased) but 'yes'/'no' or '1'/'0' is not; config templates ported from tools that accept truthy strings; quoting mistakes leaving stray spaces.
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.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- disable_list_batch should be `TRUE` or `FALSE`, parse error…
- value for enable_virtual_host_style is invalid
- name_node in uri( ) and from connection option 'name_node'(…
- err.to_string()
- sync crash me panic
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/7a36a97bca399a15.
Report an issue: GitHub.
Appendix: source
Thrown at src/query/sql/src/planner/binder/location.rs:415
root,
network_config: None,
});
l.connection
.check()
.map_err(|err| Error::new(ErrorKind::InvalidInput, err.to_string()))?;
Ok(sp)
}
// The FileSystem scheme of WebHDFS is “webhdfs://”. A WebHDFS FileSystem URI has the following format.
// webhdfs://<HOST>:<HTTP_PORT>/<PATH>
fn parse_webhdfs_params(l: &mut UriLocation, root: String) -> Result<StorageParams> {
let is_https = l
.connection
.get("https")
.map(|s| s.to_lowercase().parse::<bool>())
.unwrap_or(Ok(true))
.map_err(|e| {
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(View on GitHub (pinned to 288d84d76e)