Skip to content

docs: explain timestamp timezone comparisons - #26294

Closed
Harshil-1603 wants to merge 1 commit into
apache:mainfrom
Harshil-1603:docs/timestamp-timezones
Closed

Harshil-1603 wants to merge 1 commit into
apache:mainfrom
Harshil-1603:docs/timestamp-timezones

Conversation

@Harshil-1603

Copy link
Copy Markdown

Which issue does this PR close?

Closes #10344.

Rationale for this change

The type reference describes timestamp types but does not explain how timestamps with different or missing timezone metadata compare. In particular, a naive timestamp is interpreted in the other operand's timezone, which can surprise users expecting UTC.

What changes are included in this PR?

Document Arrow's aware and naive timestamp representation, the comparison coercion rules, two runnable SQL examples, and the distinction from timestamp arithmetic. This is documentation only and does not change timestamp behavior.

What is the testing strategy for this PR?

  • Extracted both new SQL examples from the Markdown and executed them against this checkout; both returned the documented true result.
  • Confirmed the arithmetic limitation with a query that subtracts timestamps with different timezone metadata.
  • cargo fmt --all -- --check, the documentation Prettier script, and git diff --check passed.
  • Full Clippy remains blocked by the three existing mutable_key_type errors in datafusion/optimizer/src/push_down_filter.rs (Clippy fails with all features enabled #26181). No runtime code is changed.

Are there any user-facing changes?

The SQL type reference now explains timezone semantics and comparisons. This contribution was prepared with AI assistance and checked against the current coercion implementation and actual query results.

@alamb, could you please enable CI for this documentation contribution?

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 14, 2026
@alamb alamb added the Prolific Author author opened PRs or issues in more than 20 repositories in the last 30 days label Oct 22, 2026
@alamb

alamb commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! I am closing this under DataFusion's AI Dump policy.

https://datafusion.apache.org/contributor-guide/ai-policy.html#what-is-an-ai-dump-and-why-it-is-not-helpful

This has the hallmarks of AI code that was not reviewed by the author: a docs-only change whose testing section discusses clippy, opened the same day as a sibling PR that admits its checks did not pass.

If you would like to continue, please open a focused PR in your own words that you have reviewed and understand, and we are happy to help with review.

@alamb alamb closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Prolific Author author opened PRs or issues in more than 20 repositories in the last 30 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document timezone semantics

2 participants