You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 548730b
Browse filesBrowse the repository at this point in the historyBrowse files
test: strengthen scalar UDF type recovery regression coverage (apache#25967)
## Which issue does this PR close?
- Closesapache#25925.
## Rationale for this change
The time arithmetic SQL tests added in apache#25668 retain their sorts even
when scalar UDF type recovery is removed, because ordinary arithmetic
already treats unbounded results as potentially overflowing. Checked
arithmetic needs the recovered time type to detect wrapping across
midnight, so it provides a regression test for that interaction.
## What changes are included in this PR?
- Add a checked `date_trunc('hour', t) + INTERVAL '2 hours'` property
test over ordered Time64 input. Assert that truncation preserves
ordering before checking that time arithmetic drops it.
- Cover an override returning unbounded Null bounds, and separate
bounds-preservation tests from error propagation.
- Clarify which intervals are replaced or preserved and that direct
`PhysicalExpr::evaluate_bounds` calls bypass the fallback.
## What is the testing strategy for this PR?
The new checked arithmetic test passes with type recovery and fails with
`Ordered` instead of `Unordered` when the fallback is removed. Existing
SQL tests are retained.
Validation: `cargo clippy --all-targets --all-features -- -D warnings`,
`./dev/rust_lint.sh`, the extended workspace test suite, and all 8
scalar-function unit tests. Ablation checks confirm that removing type
recovery fails the ordering assertion, and making the truncated child
unordered fails the new precondition assertion.
## Are there any user-facing changes?
UDF bounds documentation is more precise. Execution behavior and public
APIs are unchanged.
0 commit comments