Skip to content

fix: preserve native-unit bigint timestamp inputs - #79

Merged
jheer merged 1 commit into
uwdata:mainfrom
Query-farm:upstream/bigint-timestamps
Oct 22, 2026
Merged

jheer merged 1 commit into
uwdata:mainfrom
Query-farm:upstream/bigint-timestamps

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Building a second-, microsecond-, or nanosecond-resolution timestamp column from bigint values currently throws because the converter mixes bigint inputs with number arithmetic. This change stores bigint inputs in the column's native unit, making values extracted with useBigIntTimestamp usable as inputs without losing sub-millisecond precision. Number and Date inputs continue to represent milliseconds.

The implementation changes only timestamp conversion and documents the input units. Tests cover all four units, signed int64 boundaries, nulls, mixed inputs, typed arrays, iterables, multiple batches, timezone preservation, default extraction, and IPC stream/file round trips. Apache Arrow JS independently verifies the encoded int64 buffers.

Validation:

  • 208 tests pass on Node 24 and 26; lint and bundle/declaration builds pass.
  • Before the fix, 12 of the 16 new regression cases fail with the BigInt/number arithmetic error.

@jheer
jheer merged commit 9058863 into uwdata:main Oct 22, 2026
2 checks passed
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