Skip to content

[common] Fix negative timestamp decoding in Arrow and Iceberg - #4296

Open
fxbing wants to merge 1 commit into
apache:mainfrom
fxbing:fix/20260910-negative-arrow-timestamp
Open

[common] Fix negative timestamp decoding in Arrow and Iceberg#4296
fxbing wants to merge 1 commit into
apache:mainfrom
fxbing:fix/20260910-negative-arrow-timestamp

Conversation

@fxbing

@fxbing fxbing commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4295

Fix decoding failures for valid pre-epoch timestamps with sub-millisecond precision in Arrow readers and Iceberg timestamp keys.

Brief change log

  • Reuse TimestampNtz.fromMicros() and TimestampLtz.fromEpochMicros() for microsecond decoding.
  • Use Math.floorDiv / Math.floorMod for Arrow nanoseconds, retaining constructor validation.
  • Add negative, zero, and positive timestamp round-trip coverage.

Tests

  • Arrow NTZ/LTZ × micro/nano regressions and the Iceberg timestamp regression fail before the fix and pass afterward.
  • Targeted fluss-common reactor verify: 30 tests passed, including Checkstyle, Spotless, and license checks.

API and Format

No public API or storage format changes.

Documentation

No documentation changes.

Generative AI disclosure

OpenAI Codex and Claude assisted with implementation, tests, and review.

- Reuse microsecond timestamp factories and normalize Arrow nanoseconds.

- Cover pre-epoch, zero, and positive Arrow and Iceberg key round trips.
@fxbing fxbing closed this Sep 11, 2026
@fxbing fxbing reopened this Sep 11, 2026
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.

[common] Negative timestamps fail to decode in Arrow and Iceberg

1 participant