You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ding-young (via GitHub)" <gi...@apache.org> on 2025/07/07 14:26:46 UTC
[PR] optimize `ScalarValue::to_array_of_size` for structural types [datafusion]
ding-young opened a new pull request, #16706:
URL: https://github.com/apache/datafusion/pull/16706
## 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 `Closes #123` indicates that this PR will close issue #123.
-->
- Closes #13754 .
## 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.
-->
## Are these changes tested?
Yes. Existing test already handles case for array of size 1
https://github.com/apache/datafusion/blob/ec1555871f7a4d4532d7c606745c79f18d5210d1/datafusion/common/src/scalar/mod.rs#L6161-L6174
<!--
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.
-->
--
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] optimize `ScalarValue::to_array_of_size` for structural types [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #16706:
URL: https://github.com/apache/datafusion/pull/16706#issuecomment-3046183518
FYI @findepi
--
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] optimize `ScalarValue::to_array_of_size` for structural types [datafusion]
Posted by "ding-young (via GitHub)" <gi...@apache.org>.
ding-young commented on PR #16706:
URL: https://github.com/apache/datafusion/pull/16706#issuecomment-3047193295
> Thanks @ding-young looks good can this PR also have a bench file or benchmark run results to understand the optimization in numbers?
Thank you @comphead
When I run `cargo bench --bench to_array_size_of` with criterion bench script (in https://github.com/apache/datafusion/compare/main...ding-young:datafusion:scalar-struct-test), perf has improved compared to main branch.
I didn't add the bench script in this PR because I think we won't run this bench again after it gets merged.

--
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] optimize `ScalarValue::to_array_of_size` for structural types [datafusion]
Posted by "xudong963 (via GitHub)" <gi...@apache.org>.
xudong963 merged PR #16706:
URL: https://github.com/apache/datafusion/pull/16706
--
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