Skip to content

[arrow] Fix TIMESTAMP_LTZ Arrow timezone to use UTC instead of system default#7364

Open
plusplusjiajia wants to merge 1 commit intoapache:masterfrom
plusplusjiajia:fix-ts
Open

[arrow] Fix TIMESTAMP_LTZ Arrow timezone to use UTC instead of system default#7364
plusplusjiajia wants to merge 1 commit intoapache:masterfrom
plusplusjiajia:fix-ts

Conversation

@plusplusjiajia
Copy link
Copy Markdown
Member

Purpose

LocalZonedTimestampType stores UTC timestamps by definition. However, ArrowFieldTypeConversion used ZoneId.systemDefault() as the ArrowTimestamp timezone.

Tests

testTimestampArrowFieldTypeTimezone

Copy link
Copy Markdown
Contributor

@leaves12138 leaves12138 left a comment

Choose a reason for hiding this comment

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

LGTM. The fix is correct - LocalZonedTimestampType semantically stores UTC timestamps, so the Arrow field should use UTC timezone rather than system default. The test also covers both TIMESTAMP_LTZ (should be UTC) and TIMESTAMP (should be null) across multiple precisions.

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