andygrove opened a new pull request, #23545:
URL: https://github.com/apache/datafusion/pull/23545
> This PR was created by an LLM as a draft PR. I will mark it as ready for
review after human review.
## Which issue does this PR close?
N/A — autonomous exploratory PR.
## Rationale for this change
Replaced chrono DateTime/TimeDelta calendar arithmetic in the per-row
to_local_time hot path with an exact integer offset shift on the raw i64
timestamp, removing the TimeDelta construction, the DateTime addition, and the
convert-back per element.
## What changes are included in this PR?
Replaced chrono DateTime/TimeDelta calendar arithmetic in the per-row
to_local_time hot path with an exact integer offset shift on the raw i64
timestamp, removing the TimeDelta construction, the DateTime addition, and the
convert-back per element.
## Are these changes tested?
Correctness: unit tests + seeded differential fuzz (bit-identical Arrow
output vs `main`).
Benchmark (criterion):
- to_local_time_no_nulls_100k: 8.891% faster (base 4139190ns -> cand
3771157ns)
- to_local_time_10pct_nulls_100k: 8.45% faster (base 3828852ns -> cand
3505310ns)
Full criterion output:
```text
to_local_time_no_nulls_100k
time: [3.7694 ms 3.7712 ms 3.7741 ms]
change: [−9.2033% −8.8914% −8.6695%] (p = 0.00 <
0.05)
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high severe
to_local_time_10pct_nulls_100k
time: [3.5037 ms 3.5053 ms 3.5080 ms]
change: [−8.5448% −8.4501% −8.3570%] (p = 0.00 <
0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
```
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]