{"record":{"id":"8e359a7a1f9f0076","repo":"quickwit-oss/tantivy","slug":"unsupported-8e359a","errorCode":null,"errorMessage":"unsupported","messagePattern":"unsupported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/aggregation/bucket/composite/mod.rs","lineNumber":308,"sourceCode":"}\n\ntrait ToTypePaginationOrder {\n    /// Returns the pagination order key for the current type related variant.\n    ///\n    /// Panics if called on a variant representing null. Null values must be\n    /// handled separately.\n    fn column_pagination_order(&self) -> ColumnPaginationOrder;\n}\n\nimpl ToTypePaginationOrder for ColumnType {\n    fn column_pagination_order(&self) -> ColumnPaginationOrder {\n        match self {\n            ColumnType::Bool => ColumnPaginationOrder::Bool,\n            ColumnType::Str => ColumnPaginationOrder::Str,\n            ColumnType::F64 | ColumnType::I64 | ColumnType::U64 => ColumnPaginationOrder::Numeric,\n            ColumnType::IpAddr => ColumnPaginationOrder::IpAddr,\n            ColumnType::DateTime => ColumnPaginationOrder::DateTime,\n            ColumnType::Bytes => panic!(\"unsupported\"),\n        }\n    }\n}\n\nimpl ToTypePaginationOrder for CompositeIntermediateKey {\n    fn column_pagination_order(&self) -> ColumnPaginationOrder {\n        match self {\n            CompositeIntermediateKey::Bool(_) => ColumnPaginationOrder::Bool,\n            CompositeIntermediateKey::Str(_) => ColumnPaginationOrder::Str,\n            CompositeIntermediateKey::F64(_)\n            | CompositeIntermediateKey::I64(_)\n            | CompositeIntermediateKey::U64(_) => ColumnPaginationOrder::Numeric,\n            CompositeIntermediateKey::IpAddr(_) => ColumnPaginationOrder::IpAddr,\n            CompositeIntermediateKey::DateTime(_) => ColumnPaginationOrder::DateTime,\n            CompositeIntermediateKey::Null => panic!(\"null must be handled separately\"),\n        }\n    }\n}","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/quickwit-oss/tantivy/blob/b5d8deb80c26924e6b007a5b1a7630f35ca64de4/src/aggregation/bucket/composite/mod.rs#L290-L326","documentation":"Converting a schema ColumnType to a ColumnPaginationOrder for composite aggregation pagination does not support ColumnType::Bytes. Bytes columns have no pagination ordering, so the conversion panics with 'unsupported'. Pagination (after-key ordering) is only defined for bool/str/numeric/ip/date columns.","triggerScenarios":"Calling column_pagination_order() on a ColumnType::Bytes — reached when building composite aggregation pagination/order metadata for a source field whose column type is Bytes.","commonSituations":"Composite aggregation source referencing a bytes fast field; schema/mapping change moved a keyword field to bytes storage; iterating all columns in a table and computing pagination order without filtering bytes columns.","solutions":["Use a supported field type (bool/str/numeric/ip/date) as the composite source instead of a bytes field.","Filter out Bytes columns before computing pagination order for the aggregation.","Validate the source field type at request-validation time and return a proper error for bytes."],"exampleFix":"// before\nlet order = column_type.column_pagination_order(); // panics for Bytes\n// after\nif column_type == ColumnType::Bytes {\n    return Err(InvalidArgument(\"bytes columns do not support composite pagination\"));\n}\nlet order = column_type.column_pagination_order();","handlingStrategy":"validation","validationCode":"if column_type == ColumnType::Bytes {\n    return Err(InvalidArgument(\"bytes columns cannot drive composite pagination\"));\n}\nlet order = column_type.column_pagination_order();","typeGuard":"fn supports_pagination(t: &ColumnType) -> bool {\n    !matches!(t, ColumnType::Bytes)\n}","tryCatchPattern":null,"preventionTips":["Reject bytes fields as composite sources during request validation","Filter bytes columns before computing pagination order","Document supported source types in aggregation config validation"],"tags":["panic","aggregation","composite","pagination","unsupported-type"],"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"}