Uh oh!
There was an error while loading. Please reload this page.
perf: Cast entire Date32 array to Date64 on 1st failure - #21948
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
huymq1710
commented
Apr 30, 2026
Thank you. I updated |
Omega359
commented
May 3, 2026
Previous work on this might show some insight - #15361 (comment) |
alamb
left a comment
There was a problem hiding this comment.
Thanks @huymq1710 and @kumarUjjawal and @Omega359
THis looks good to me at a high level -- I would like to get the benchmark in place so we can verify performance
| // handle time specifiers and falls back to a Date64 cast. | ||
| // Covers full fallback (every row triggers the cast) | ||
| c.bench_function("to_char_array_date32_datetime_patterns_1000", |b| { |
There was a problem hiding this comment.
Thank you @huymq1710
Can you please put this new benchmark into a separate PR so that we can use our automated benchmark runner to compare the performance of main and your proposal?
There was a problem hiding this comment.
Got it, I temporary removed benchmark changes, I will create other PR to add back after this PR is merged
There was a problem hiding this comment.
@alamb One clarification, do you want this merged first or the pr with benchmark?
There was a problem hiding this comment.
Typically I like to merge the PR with the benchmark first, then merge up the PR with performance improvements, and then validate the benchmark results using the run benchmarks command.
kumarUjjawal
commented
May 4, 2026
@huymq1710 can you open the pr with the benchmark |
huymq1710
commented
May 4, 2026
I see, created |
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closesapache#123` indicates that this PR will close issue apache#123. --> - Closes #. ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Benchmark for apache#21948 ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## 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. -->
kumarUjjawal
commented
May 4, 2026
run benchmark |
adriangbot
commented
May 4, 2026
Hi @kumarUjjawal, Supported benchmarks:
Usage: Per-side configuration ( env:
SHARED_SETTING: enabledbaseline:
ref: v45.0.0env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: 1Gchanged:
ref: v46.0.0env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: 2GFile an issue against this benchmark runner |
kumarUjjawal
commented
May 4, 2026
run benchmark to_char |
adriangbot
commented
May 4, 2026
🤖 Criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing cast-entire-date32-array (205f116) to b2fd2d3 (merge-base) diff File an issue against this benchmark runner |
adriangbot
commented
May 4, 2026
🤖 Criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)DetailsResource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
kumarUjjawal
commented
May 4, 2026
Benchmark looks good! |
kumarUjjawal
commented
May 6, 2026
Thanks all! |
Uh oh!
There was an error while loading. Please reload this page.
Which issue does this PR close?
to_charfor array conversions #17152Rationale for this change
1.
Vec<Option<String>>extra allocationsto_charto allocate less, fix NULL handling #20635 by usingStringBuilder2. Per-row cast on fallback
What changes are included in this PR?
Cast the entire Date32 array to Date64 once on first failure, instead of per-row
Are these changes tested?
Yes
Date32 + datetimepatterns (all rows trigger the fallback)Date32 + mixed patterns(roughly half do)Detail
Are there any user-facing changes?
No