{"record":{"id":"7c2e1380e0f34462","repo":"influxdata/influxdb","slug":"is-a-qualified-path-a-catalog-record-may-only-hold-types","errorCode":null,"errorMessage":"`{}` is a qualified path. A catalog record may only hold types whose encoding the catalog owns — declare a wire type in `records::types` and convert to the runtime type in `apply`.","messagePattern":"`(.+?)` is a qualified path\\. A catalog record may only hold types whose encoding the catalog owns — declare a wire type in `records::types` and convert to the runtime type in `apply`\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog_macros/src/types.rs","lineNumber":35,"sourceCode":"    \"u128\", \"usize\",\n];\n\n/// Containers that may wrap another allowed type.\nconst CONTAINERS: &[&str] = &[\"Option\", \"Vec\"];\n\n/// Check one field type against the allowlist.\npub(crate) fn check(ty: &Type) -> syn::Result<()> {\n    match ty {\n        Type::Array(array) => check(&array.elem),\n        Type::Tuple(tuple) => tuple.elems.iter().try_for_each(check),\n        Type::Path(path) if path.qself.is_none() => check_path(ty, &path.path),\n        _ => Err(unsupported(ty)),\n    }\n}\n\nfn check_path(ty: &Type, path: &syn::Path) -> syn::Result<()> {\n    if path.leading_colon.is_some() || path.segments.len() > 1 {\n        return Err(syn::Error::new(\n            ty.span(),\n            format!(\n                \"`{}` is a qualified path. A catalog record may only hold types whose encoding \\\n                 the catalog owns — declare a wire type in `records::types` and convert to the \\\n                 runtime type in `apply`.\",\n                render(ty)\n            ),\n        ));\n    }\n\n    let segment = &path.segments[0];\n    let name = segment.ident.to_string();\n\n    match &segment.arguments {\n        PathArguments::None => Ok(()),\n        // Every argument a const literal, e.g. `Reserved<16>`. Permitted where\n        // a type parameter is not: the objection to a generic body is that it\n        // has no single persisted shape, and a const argument does have one.","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog_macros/src/types.rs#L17-L53","documentation":"A compile-time error from the catalog record field-type checker (`types::check_path`). Catalog records may only contain types whose wire encoding the catalog itself owns — bare single-segment path names. Qualified paths (`std::string::String`, `crate::Foo`) are rejected because the macro keys its type checks and fingerprint on simple type names and cannot own foreign/qualified encodings.","triggerScenarios":"Declaring a catalog record field whose type is written as a qualified path with a leading `::` or more than one path segment, e.g. `field: std::collections::HashMap<u64, u64>`. Raised via `check` -> `check_path` during macro expansion.","commonSituations":"A developer writes the fully-qualified type out of habit or because of an import collision, or uses a type from another crate directly in the record.","solutions":["Import the type and use its bare name (`String` instead of `std::string::String`).","For foreign types, declare a dedicated wire type in `records::types` and convert to the runtime type in the record's `apply` method."],"exampleFix":"// before\n#[catalog_record(shape = 0x1)]\nstruct Foo { s: std::string::String }\n\n// after\n#[catalog_record(shape = 0x1)]\nstruct Foo { s: String }","handlingStrategy":"validation","validationCode":"// Use bare single-segment type names in record fields:\nuse std::string::String;\nstruct Foo { s: String } // OK, not std::string::String","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import types and reference them by bare name in record fields.","Never fully qualify field types inside #[catalog_record] structs.","Route foreign types through records::types wire types."],"tags":["proc-macro","compile-time","type-system","serialization"],"backgroundTag":"invalid-argument-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}