Skip to content

Migrate column_stats timestamp surfaces to Jiff #793

Description

@danbi2990

Background

column_stats currently exposes chrono::NaiveDateTime through public table methods while storing timestamp keys as i64 nanoseconds. Stored values also include structured statistics where structured::Element::DateTime is already Jiff-backed.

This implementation should migrate the public/API and internal conversion surfaces to Jiff while preserving the existing stored key contract.

Prerequisites

  • column_stats timestamp contract baseline has landed.
  • Any old-format fixture needed by the touched column_stats surface exists before production type changes are made.

Scope

  • Migrate public column_stats methods that accept or return chrono::NaiveDateTime.
  • Preserve the internal i64 nanoseconds key layout.
  • Migrate Statistics.batch_ts as needed.
  • Preserve load_rounds_by_cluster seek/pagination behavior.
  • Keep structured::Element::DateTime handling compatible with the existing Jiff-backed structured value behavior.

Acceptance criteria

  • Existing column_stats baseline fixtures continue to pass.
  • The same logical timestamp produces the same stored key bytes.
  • Query, seek, pagination, and purge behavior affected by timestamp ordering remain covered by tests.
  • Public/API impact is visible in tests or compile checks.
  • Any remaining chrono usage in the touched column_stats surface is removed or explicitly justified as compatibility code.

Out of scope

  • Event key migration.
  • Stored bincode table value migrations outside column_stats.
  • Final chrono dependency cleanup.

Notes

Related discussion: #733

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

blockedPending another issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions