{"record":{"id":"46f0de36150432a2","repo":"vectordotdev/vector","slug":"tag","errorCode":null,"errorMessage":"Tag","messagePattern":"Tag","errorType":"validation","errorClass":"nom::Err::Error","httpStatus":null,"severity":"error","filePath":"src/sinks/clickhouse/arrow/parser.rs","lineNumber":285,"sourceCode":"            .map(|scale| ClickHouseType::Decimal {\n                precision: DECIMAL64_PRECISION,\n                scale,\n            })\n            .parse(rest),\n        \"Decimal128\" => parens(parse_i8)\n            .map(|scale| ClickHouseType::Decimal {\n                precision: DECIMAL128_PRECISION,\n                scale,\n            })\n            .parse(rest),\n        \"Decimal256\" => parens(parse_i8)\n            .map(|scale| ClickHouseType::Decimal {\n                precision: DECIMAL256_PRECISION,\n                scale,\n            })\n            .parse(rest),\n\n        _ => Err(nom::Err::Error(Error::new(input, ErrorKind::Tag))),\n    }\n}\n\nimpl FromStr for ClickHouseType {\n    type Err = String;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        all_consuming(ch_type)\n            .parse(s)\n            .map(|(_, parsed)| parsed)\n            .map_err(|e| format!(\"Failed to parse ClickHouse type '{s}': {e}\"))\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/sinks/clickhouse/arrow/parser.rs#L267-L303","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// parser fallthrough (for contributors)\n// before\n_ => Err(nom::Err::Error(Error::new(input, ErrorKind::Tag))),\n\n// after — add the missing arm first\n\"Nullable\" => parse_nullable(input),\n_ => Err(nom::Err::Error(Error::new(input, ErrorKind::Tag))),","handlingStrategy":"fallback","validationCode":"// validate table column types against supported set before using native transport\nlet unsupported: Vec<_> = columns.iter()\n    .filter(|c| !SUPPORTED_CH_TYPES.iter().any(|s| c.r#type.starts_with(s)))\n    .collect();","typeGuard":null,"tryCatchPattern":"match parse_result {\n    Err(nom::Err::Error(e)) if e.code == ErrorKind::Tag => { /* fall back to HTTP transport or skip column */ }\n    other => other?,\n}","preventionTips":["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."],"tags":["clickhouse","parser","nom","arrow"],"backgroundTag":"unexpected-response-shape","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}