{"record":{"id":"bcda2f1901024e35","repo":"databendlabs/databend","slug":"unsupported-field-type-for-derive-walk-derive-wal","errorCode":null,"errorMessage":"unsupported field type for derive(Walk)/derive(WalkMut)","messagePattern":"unsupported field type for derive\\(Walk\\)/derive\\(WalkMut\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/query/ast/visit_derive/src/lib.rs","lineNumber":224,"sourceCode":"            } else {\n                quote!(crate::visit::Walk)\n            };\n            let method = if mutable {\n                quote!(walk_mut)\n            } else {\n                quote!(walk)\n            };\n            Ok(quote! {\n                match #trait_name::#method(#access, visitor)? {\n                    crate::visit::VisitControl::Continue => {}\n                    crate::visit::VisitControl::SkipChildren => {}\n                    crate::visit::VisitControl::Break(value) => {\n                        return Ok(crate::visit::VisitControl::Break(value));\n                    }\n                }\n            })\n        }\n        _ => Err(Error::new(\n            ty.span(),\n            \"unsupported field type for derive(Walk)/derive(WalkMut)\",\n        )),\n    }\n}\n\nfn is_primitive_noop_leaf(name: &str) -> bool {\n    // Keep this list intentionally small and in sync with the explicit\n    // `impl_noop_walk!` block in `src/query/ast/src/visit.rs`.\n    matches!(\n        name,\n        \"bool\"\n            | \"u8\"\n            | \"u16\"\n            | \"u32\"\n            | \"u64\"\n            | \"usize\"\n            | \"i8\"","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/query/ast/visit_derive/src/lib.rs#L206-L242","documentation":"A compile-time guard in emit_walk_for_type: the last path segment of a field's type names a type that has no registered Walk/WalkMut implementation and is not a known primitive or supported container. The derive macro emits this error so unsupported field types fail at compile time instead of generating non-compiling code.","triggerScenarios":"Thrown at src/query/ast/visit_derive/src/lib.rs:224 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the memory pool's close/shutdown only happens after all spill writers have stopped requesting buffers.","In alloc_buffer, treat the closed-channel error distinctly and surface a shutdown-aware error so callers stop retrying allocation.","Coordinate task cancellation so buffers are released back to the pool before it is closed."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}