Minghan2005 opened a new pull request, #11329: URL: https://github.com/apache/arrow-rs/pull/11329
# Which issue does this PR close? Part of #10829. This adds baseline benchmarks only and does not close the issue. # Rationale for this change The existing temporal-formatting benchmark uses a numeric offset and does not cover named timezones or the other cast paths proposed for optimization in #10829. These cases let us compare fixed offsets, named constant zones, and a zone whose offset varies across the input, before changing the implementation. This follows the contribution guide's request to submit new benchmarks separately from performance changes. # What changes are included in this PR? Adds the `cast_temporal` Criterion target with four operations across `+05:30`, `UTC`, `Etc/GMT+5`, and `America/New_York`: - Timezone-aware timestamp to Date32, Time32(Second), and Utf8. - Timezone-free timestamp to timestamp with the requested timezone. The 8,192-element TimestampSecond input is deterministic, includes 820 nulls, and spans all dates of 2024. Noon-adjacent local times exercise both New York offset regimes without benchmarking ambiguous/nonexistent wall-clock error handling. Input preparation and smoke assertions are outside the timed loop; each iteration measures the public cast operation, including output allocation. # Are these changes tested? - `cargo bench -p arrow-cast --bench cast_temporal -- --test`: all 16 cases passed. - `cargo clippy -p arrow-cast --bench cast_temporal -- -D warnings`: passed. - `cargo +stable fmt --all -- --check` and `git diff --check`: passed. Smoke checks verify the result datatype, array length, and null count. This benchmark-only PR makes no performance-improvement claim. # Are there any user-facing changes? No production behavior or API changes. # AI usage disclosure Codex assisted with the benchmark implementation, validation, code review, and this description. -- 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]
