Skip to content

feat: add timestamp and duration support in leaf data hashing (ITL-438)#8

Merged
eywalker merged 5 commits into
mainfrom
eywalker/itl-438-add-support-for-timestamp-and-duration-types-in-leaf-data
Jun 29, 2026
Merged

feat: add timestamp and duration support in leaf data hashing (ITL-438)#8
eywalker merged 5 commits into
mainfrom
eywalker/itl-438-add-support-for-timestamp-and-duration-types-in-leaf-data

Conversation

@kurodo3

@kurodo3 kurodo3 Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds is_timestamp and is_duration checks to _element_size_for_type in arrow_digester.py (return 8 — int64 physical storage)
  • Adds test_timestamp_types_in_schema and test_duration_types_in_schema to test_arrow_digester.py
  • Adds TestTimestampDurationHashing class in test_golden_parity.py with 15 tests, golden hash values taken from the Rust starfix implementation (byte-for-byte identical)

Dependency

Golden hash values were generated from nauticalab/starfix after implementing the Rust fix. Python and Rust hashes are byte-for-byte identical.

Test plan

  • pytest tests/ passes (193 tests)

Closes ITL-438
🤖 Generated with Claude Code

kurodo3 Bot and others added 5 commits June 28, 2026 20:15
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ec (ITL-438)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add is_timestamp and is_duration checks to _element_size_for_type (8 bytes each)
- Add test_timestamp_types_in_schema and test_duration_types_in_schema
- Add TestTimestampDurationHashing golden parity tests (15 cases)
  matching Rust starfix byte-for-byte

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for hashing Arrow timestamp and duration leaf arrays in the Python ArrowDigester, aligning behavior and golden outputs with the Rust starfix implementation (ITL-438).

Changes:

  • Treat timestamp and duration leaf buffers as fixed-width 8-byte (int64) elements in _element_size_for_type.
  • Add schema-serialization assertions ensuring timestamp unit/tz and duration unit are captured in serialized schema JSON.
  • Add golden parity tests (with Rust-derived expected hashes) covering all timestamp units (tz-aware UTC and tz-naive) and all duration units, plus “units differ” / “tz differs” invariants.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/starfix/arrow_digester.py Adds fixed-width sizing for timestamp/duration leaf hashing (8 bytes).
tests/test_arrow_digester.py Adds schema serialization tests for timestamp (unit+tz) and duration (unit).
tests/test_golden_parity.py Adds Rust-aligned golden hash parity tests for timestamp/duration arrays.
docs/metamorphic/specs/2026-06-28-timestamp-duration-hashing-design.md Documents design rationale and success criteria for the hashing change.
docs/metamorphic/plans/2026-06-28-timestamp-duration-hashing.md Adds an implementation plan capturing steps and test strategy for the change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@eywalker eywalker merged commit d2ed97e into main Jun 29, 2026
17 checks passed
@eywalker eywalker deleted the eywalker/itl-438-add-support-for-timestamp-and-duration-types-in-leaf-data branch June 29, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants