You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/07/11 00:45:29 UTC

[PR] perf: optimize make_date in datafusion-functions [datafusion]

andygrove opened a new pull request, #23470:
URL: https://github.com/apache/datafusion/pull/23470

   > 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 make_date's per-element triple is_null check + PrimitiveBuilder with a single unioned NullBuffer, raw value-slice reads, and direct PrimitiveArray::new construction (matching the already-optimized make_time), cutting per-row overhead on the hot valid-input path.
   
   ## What changes are included in this PR?
   
   Replaced make_date's per-element triple is_null check + PrimitiveBuilder with a single unioned NullBuffer, raw value-slice reads, and direct PrimitiveArray::new construction (matching the already-optimized make_time), cutting per-row overhead on the hot valid-input path.
   
   ## Are these changes tested?
   
   Correctness: unit tests + seeded differential fuzz (bit-identical Arrow output vs `main`).
   
   Benchmark (criterion):
   
   - make_date_scalar_col_col_8192: 19.979% faster (base 31210ns -> cand 24974ns)
   - make_date_col_col_col_8192: 16.931% faster (base 30849ns -> cand 25626ns)
   - make_date_scalar_scalar_col_8192: 22.999% faster (base 31551ns -> cand 24295ns)
   - make_date_scalar_scalar_scalar: 1.271% faster (base 48ns -> cand 48ns)
   
   
   ## 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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: optimize make_date in datafusion-functions [datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #23470:
URL: https://github.com/apache/datafusion/pull/23470


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org