Skip to content

Add tests for numeric conversion to DateTime64 / Time64 at range boundaries - #127309

Merged
alexey-milovidov merged 1 commit into
masterfrom
tests-datetime64-numeric-overflow-coverage
Oct 22, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
tests-datetime64-numeric-overflow-coverage

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Adds two stateless tests that were written in #101512 and moved out of it, because they describe behaviour that master already has (so they made that bug-fix PR's Bugfix validation check fail):

  • 05055_datetime64_numeric_min_native_boundary: the lower Int64 tick boundary of DateTime64(9) under every date_time_overflow_behavior mode, and saturate clamping to the minimum tick;
  • 05218_accurate_cast_numeric_to_datetime64_time64: accurateCast, accurateCastOrNull and accurateCastOrDefault from a number to DateTime64 / Time64 decide on representability alone, regardless of date_time_overflow_behavior.

Both passed on master in the Bugfix validation job of #101512.

Related: #101512

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/127309]

Version info

  • Merged into: 26.11.1.511-master (included in 26.11 and later)

…boundaries

The tests were written in #101512
and moved out of it because they describe behaviour that `master` already has:
- `05055_datetime64_numeric_min_native_boundary`: the lower `Int64` tick boundary
  of `DateTime64(9)` under every `date_time_overflow_behavior` mode;
- `05218_accurate_cast_numeric_to_datetime64_time64`: `accurateCast`,
  `accurateCastOrNull` and `accurateCastOrDefault` to `DateTime64` / `Time64`
  decide on representability alone, regardless of the setting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [59424f9]

Summary: ✅


AI Review

Summary

Adds two stateless tests covering numeric conversions to DateTime64, Time64, and Time, including range boundaries, overflow modes, and accurate casts. No actionable findings. Both new tests pass in the Fast test report.

Final Verdict

Status: ✅ Approve.

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-testing Test content only (no production code). labels Oct 22, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok.

@alexey-milovidov alexey-milovidov self-assigned this Oct 22, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 22, 2026
Merged via the queue into master with commit 26bf52e Oct 22, 2026
178 checks passed
@alexey-milovidov
alexey-milovidov deleted the tests-datetime64-numeric-overflow-coverage branch October 22, 2026 05:05
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 22, 2026
@clickhouse-gh clickhouse-gh Bot added comp-datetime Date/DateTime/TimeZone datatypes and date-time semantics. and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-datetime Date/DateTime/TimeZone datatypes and date-time semantics. pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants