quickwit-oss/tantivy · error

unsupported

Error message

unsupported

What it means

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.

Source

Thrown at src/aggregation/bucket/composite/mod.rs:308

}

trait ToTypePaginationOrder {
    /// Returns the pagination order key for the current type related variant.
    ///
    /// Panics if called on a variant representing null. Null values must be
    /// handled separately.
    fn column_pagination_order(&self) -> ColumnPaginationOrder;
}

impl ToTypePaginationOrder for ColumnType {
    fn column_pagination_order(&self) -> ColumnPaginationOrder {
        match self {
            ColumnType::Bool => ColumnPaginationOrder::Bool,
            ColumnType::Str => ColumnPaginationOrder::Str,
            ColumnType::F64 | ColumnType::I64 | ColumnType::U64 => ColumnPaginationOrder::Numeric,
            ColumnType::IpAddr => ColumnPaginationOrder::IpAddr,
            ColumnType::DateTime => ColumnPaginationOrder::DateTime,
            ColumnType::Bytes => panic!("unsupported"),
        }
    }
}

impl ToTypePaginationOrder for CompositeIntermediateKey {
    fn column_pagination_order(&self) -> ColumnPaginationOrder {
        match self {
            CompositeIntermediateKey::Bool(_) => ColumnPaginationOrder::Bool,
            CompositeIntermediateKey::Str(_) => ColumnPaginationOrder::Str,
            CompositeIntermediateKey::F64(_)
            | CompositeIntermediateKey::I64(_)
            | CompositeIntermediateKey::U64(_) => ColumnPaginationOrder::Numeric,
            CompositeIntermediateKey::IpAddr(_) => ColumnPaginationOrder::IpAddr,
            CompositeIntermediateKey::DateTime(_) => ColumnPaginationOrder::DateTime,
            CompositeIntermediateKey::Null => panic!("null must be handled separately"),
        }
    }
}

View on GitHub (pinned to b5d8deb80c)

Solutions

  1. Use a supported field type (bool/str/numeric/ip/date) as the composite source instead of a bytes field.
  2. Filter out Bytes columns before computing pagination order for the aggregation.
  3. Validate the source field type at request-validation time and return a proper error for bytes.

Example fix

// before
let order = column_type.column_pagination_order(); // panics for Bytes
// after
if column_type == ColumnType::Bytes {
    return Err(InvalidArgument("bytes columns do not support composite pagination"));
}
let order = column_type.column_pagination_order();
Defensive patterns

Strategy: validation

Validate before calling

if column_type == ColumnType::Bytes {
    return Err(InvalidArgument("bytes columns cannot drive composite pagination"));
}
let order = column_type.column_pagination_order();

Type guard

fn supports_pagination(t: &ColumnType) -> bool {
    !matches!(t, ColumnType::Bytes)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quickwit-oss/tantivy@b5d8deb80c (2026-09-05). Data as JSON: /api/errors/8e359a7a1f9f0076. Report an issue: GitHub.