Skip to content

nd-arrow: broadcast geometry encoding classifier #277

@robinskil

Description

@robinskil

Part of #276 (Phase 1).

Goal

A pure function in beacon-nd-arrow that classifies, from broadcast geometry alone, how each output column of a flattened ND batch should be encoded.

Signature (sketch)

classify_encoding(variable_dims, broadcast_target_shape, flatten_order) -> Vec<ColumnEncoding>
// ColumnEncoding = Flat | RunEndEncoded | Dictionary

Rules

  • Outer / slow-varying broadcast dim → RunEndEncoded (run length = product of inner dims).
  • Inner / fast-varying cyclic broadcast dim → Dictionary (low cardinality, short cycles in row-major).
  • Non-broadcast data column → Flat.

Notes

  • Exact, geometry-derived — no statistical/cardinality detection.
  • No DataFusion dependency (keep beacon-nd-arrow arrow-only).

Acceptance

  • Unit tests over known geometries (single/multi broadcast dims, mixed ranks, chunked shapes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions