vectordotdev/vector · error · nom::Err::Error
Tag
Error message
Tag
What it means
The ClickHouse Arrow type parser (nom-based) fails with `ErrorKind::Tag` when parsing a ClickHouse type string: the `ch_type` parser's fallthrough arm matches no known type prefix, so nom reports a Tag mismatch at the remaining input.
Solutions
- Check which ClickHouse type string failed and whether the parser supports it; upgrade Vector for newer type support.
- Switch the sink transport from native/Arrow to HTTP (JSON) which doesn't use this parser.
- Alter the table column to a supported type (e.g. standard numeric/string types).
- Report/patch the missing type in src/sinks/clickhouse/arrow/parser.rs.
Example fix
// parser fallthrough (for contributors) // before _ => Err(nom::Err::Error(Error::new(input, ErrorKind::Tag))), // after — add the missing arm first "Nullable" => parse_nullable(input), _ => Err(nom::Err::Error(Error::new(input, ErrorKind::Tag))),
Defensive patterns
Strategy: fallback
Validate before calling
// validate table column types against supported set before using native transport
let unsupported: Vec<_> = columns.iter()
.filter(|c| !SUPPORTED_CH_TYPES.iter().any(|s| c.r#type.starts_with(s)))
.collect(); Try / catch
match parse_result {
Err(nom::Err::Error(e)) if e.code == ErrorKind::Tag => { /* fall back to HTTP transport or skip column */ }
other => other?,
} Prevention
- Keep ClickHouse column types within the parser's supported set when using the native/Arrow path.
- Prefer HTTP transport for tables with exotic types.
- Test schema discovery after ClickHouse server upgrades.
When it happens
Trigger: Querying a ClickHouse column whose type string is not in the parser's supported list (exotic/nested types, new ClickHouse versions, parameterized types the parser doesn't recognize).
Common situations: Sink/schema discovery against a ClickHouse server using newer or uncommon column types (e.g. unsupported Map/JSON variants), causing native (Arrow) transport schema parsing to fail.
Related errors
- all json-file keys should be matched
- Encountered schema with subschema validation that wasn't…
- Invalid Map schema for field
- {}
- Schema type was not able to be detected!
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/46f0de36150432a2.
Report an issue: GitHub.
Appendix: source
Thrown at src/sinks/clickhouse/arrow/parser.rs:285
.map(|scale| ClickHouseType::Decimal {
precision: DECIMAL64_PRECISION,
scale,
})
.parse(rest),
"Decimal128" => parens(parse_i8)
.map(|scale| ClickHouseType::Decimal {
precision: DECIMAL128_PRECISION,
scale,
})
.parse(rest),
"Decimal256" => parens(parse_i8)
.map(|scale| ClickHouseType::Decimal {
precision: DECIMAL256_PRECISION,
scale,
})
.parse(rest),
_ => Err(nom::Err::Error(Error::new(input, ErrorKind::Tag))),
}
}
impl FromStr for ClickHouseType {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
all_consuming(ch_type)
.parse(s)
.map(|(_, parsed)| parsed)
.map_err(|e| format!("Failed to parse ClickHouse type '{s}': {e}"))
}
}
#[cfg(test)]
mod tests {
use super::*;
View on GitHub (pinned to bdb87aeaa4)