{"record":{"id":"b5bfdd671b32c8ed","repo":"quickwit-oss/tantivy","slug":"unsupported","errorCode":null,"errorMessage":"unsupported","messagePattern":"unsupported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/aggregation/bucket/composite/accessors.rs","lineNumber":480,"sourceCode":"        })?;\n        Ok(next_ord.into())\n    }\n\n    /// Projects the after key into the column space of the given accessor.\n    ///\n    /// The computed after key will not take care of skipping entire columns\n    /// when the after key type is ordered after the accessor's type, that\n    /// should be performed earlier.\n    pub fn precompute(\n        composite_accessor: &CompositeAccessor,\n        source_after_key: &CompositeIntermediateKey,\n        field: &str,\n        missing_order: MissingOrder,\n        order: Order,\n    ) -> crate::Result<Self> {\n        use CompositeIntermediateKey as CIKey;\n        let precomputed_key = match (composite_accessor.column_type, source_after_key) {\n            (ColumnType::Bytes, _) => panic!(\"unsupported\"),\n            // null after key\n            (_, CIKey::Null) => precompute_missing_after_key(false, missing_order, order),\n            // numerical\n            (ColumnType::I64, CIKey::I64(k)) => PrecomputedAfterKey::Exact(k.to_u64()),\n            (ColumnType::I64, CIKey::U64(k)) => num_proj::u64_to_i64(*k).into(),\n            (ColumnType::I64, CIKey::F64(k)) => num_proj::f64_to_i64(*k).into(),\n            (ColumnType::U64, CIKey::I64(k)) => num_proj::i64_to_u64(*k).into(),\n            (ColumnType::U64, CIKey::U64(k)) => PrecomputedAfterKey::Exact(*k),\n            (ColumnType::U64, CIKey::F64(k)) => num_proj::f64_to_u64(*k).into(),\n            (ColumnType::F64, CIKey::I64(k)) => num_proj::i64_to_f64(*k).into(),\n            (ColumnType::F64, CIKey::U64(k)) => num_proj::u64_to_f64(*k).into(),\n            (ColumnType::F64, CIKey::F64(k)) => PrecomputedAfterKey::Exact(k.to_u64()),\n            // boolean\n            (ColumnType::Bool, CIKey::Bool(key)) => PrecomputedAfterKey::Exact(key.to_u64()),\n            // string\n            (ColumnType::Str, CIKey::Str(key)) => PrecomputedAfterKey::precompute_term_ord(\n                &composite_accessor.str_dict_column,\n                key,","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/quickwit-oss/tantivy/blob/b5d8deb80c26924e6b007a5b1a7630f35ca64de4/src/aggregation/bucket/composite/accessors.rs#L462-L498","documentation":"Composite aggregation precomputation of the 'after' key cannot handle columns of type Bytes. Byte-column (bytes/JSON-ish) accessors have no precomputed after-key representation, so the code panics with 'unsupported'. Only I64/U64/F64/Str/Date-type accessors support precomputed pagination keys here.","triggerScenarios":"Running a composite aggregation with a source whose column_type is ColumnType::Bytes (e.g. a `bytes` fast field, or a keyword field mapped to bytes storage) together with an after_key / pagination request, hitting precompute in accessors.rs.","commonSituations":"Paginating a composite aggregation over a bytes-backed field; a schema change moved a field from u64/keyword to bytes fast field; using raw-bytes fields as composite sources where only numeric/str/date are supported.","solutions":["Change the composite source field to a supported type (u64/i64/f64/keyword-str/date) in the schema or mapping.","If the field must stay bytes, avoid `after` pagination on it, or handle it via a separate non-precomputed path.","Check the accessor's column_type at query-build time and reject bytes sources with a proper error instead of reaching precompute."],"exampleFix":"// before\nlet precomputed = precompute(...source_after_key...); // panics for Bytes\n// after\nif composite_accessor.column_type == ColumnType::Bytes {\n    return Err(TantivyError::InvalidArgument(\n        \"bytes fields are not supported as composite aggregation sources\".into()));\n}\nlet precomputed = precompute(...source_after_key...);","handlingStrategy":"validation","validationCode":"if accessor.column_type == ColumnType::Bytes {\n    return Err(InvalidArgument(\"bytes field not supported in composite source\"));\n}","typeGuard":"fn is_composite_supported(t: ColumnType) -> bool {\n    !matches!(t, ColumnType::Bytes)\n}","tryCatchPattern":null,"preventionTips":["Validate aggregation source field types against the schema at request build time","Avoid bytes fast fields as composite aggregation sources","Re-check field types after schema migrations"],"tags":["panic","aggregation","composite","unsupported-type","bytes"],"backgroundTag":"unsupported-aggregation-field-type","analyzedSha":"b5d8deb80c26924e6b007a5b1a7630f35ca64de4","analyzedAt":"2026-09-05T13:20:51.521Z","contentChangedAt":"2026-09-05T13:20:51.521Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}