Skip to content

Conversation

@danking
Copy link
Contributor

@danking danking commented Jan 5, 2026

I discovered this implicit mapping from TemporalMetadata to DType by trial-and-error and looking at arrays/datetime/mod.rs. AFAIK, this relationship between temporal type and bitwidth comes from the arrow
specification
.

For arrays, TemporalArray already addresses these issues [1], but for Vortex users who create or manipulate scalars, these methods are valuable.

[1] Insofar as temporal array expects you to give it a valid PType (it panics if the width is
wrong) but will construct the extension DType for you.

I discovered this implicit mapping from TemporalMetadata to DType by trial-and-error and looking at
arrays/datetime/mod.rs. AFAIK, this relationship between temporal type and bitwidth comes from [the
arrow
specification](https://github.com/apache/arrow/blob/7151dcd6faa6a507d99b33ecc797f3d6a74f45ae/format/Schema.fbs#L246-L277).

For arrays, TemporalArray already addresses these issues [1], but for Vortex users who create or
manipulate scalars, these methods are valuable.

[1] Insofar as temporal array expects you to give it a valid PType (it panics if the width is
    wrong) but will construct the extension DType for you.

Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Daniel King <dan@spiraldb.com>
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.97%. Comparing base (6a9f07a) to head (dac256e).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
vortex-dtype/src/datetime/temporal.rs 0.00% 27 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danking danking added the changelog/feature A new feature label Jan 5, 2026
@joseph-isaacs joseph-isaacs merged commit 49b1634 into develop Jan 6, 2026
48 of 49 checks passed
@joseph-isaacs joseph-isaacs deleted the dk/temporal-utilities branch January 6, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants