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 2024/08/10 18:03:55 UTC
[PR] Minor: ScanExec code cleanup and additional documentation [datafusion-comet]
andygrove opened a new pull request, #804:
URL: https://github.com/apache/datafusion-comet/pull/804
## 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.
-->
N/A
## 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.
-->
I recently learned more about how ScanExec works so I thought I would add some documentation to help other contributors.
## 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.
-->
- More documentation
- Some pedantic code cleanup changes
- Use a single metrics timer instead of two timers when fetching batches
- Create a vector with the correct capacity
- Re-use CastOptions across all batches instead of creating per-batch
## How 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)?
-->
Existing tests
--
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] Minor: ScanExec code cleanup and additional documentation [datafusion-comet]
Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on code in PR #804:
URL: https://github.com/apache/datafusion-comet/pull/804#discussion_r1714126160
##########
native/core/src/execution/operators/scan.rs:
##########
@@ -109,11 +120,15 @@ impl ScanExec {
/// This is necessary since DataFusion doesn't handle dictionary array with values
/// being primitive type.
///
- /// TODO: revisit this once DF has imprved its dictionary type support. Ideally we shouldn't
+ /// TODO: revisit this once DF has improved its dictionary type support. Ideally we shouldn't
/// do this in Comet but rather let DF to handle it for us.
fn unpack_dictionary_type(dt: &DataType) -> DataType {
if let DataType::Dictionary(_, vt) = dt {
- if !matches!(vt.as_ref(), DataType::Utf8 | DataType::Binary) {
+ if !matches!(
+ vt.as_ref(),
+ DataType::Utf8 | DataType::LargeUtf8 | DataType::Binary
Review Comment:
How about LargeBinary?
--
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] Minor: ScanExec code cleanup and additional documentation [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #804:
URL: https://github.com/apache/datafusion-comet/pull/804#discussion_r1714203620
##########
native/core/src/execution/operators/scan.rs:
##########
@@ -109,11 +120,15 @@ impl ScanExec {
/// This is necessary since DataFusion doesn't handle dictionary array with values
/// being primitive type.
///
- /// TODO: revisit this once DF has imprved its dictionary type support. Ideally we shouldn't
+ /// TODO: revisit this once DF has improved its dictionary type support. Ideally we shouldn't
/// do this in Comet but rather let DF to handle it for us.
fn unpack_dictionary_type(dt: &DataType) -> DataType {
if let DataType::Dictionary(_, vt) = dt {
- if !matches!(vt.as_ref(), DataType::Utf8 | DataType::Binary) {
+ if !matches!(
+ vt.as_ref(),
+ DataType::Utf8 | DataType::LargeUtf8 | DataType::Binary
Review Comment:
Added. Thanks.
--
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] Minor: ScanExec code cleanup and additional documentation [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #804:
URL: https://github.com/apache/datafusion-comet/pull/804
--
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] Minor: ScanExec code cleanup and additional documentation [datafusion-comet]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #804:
URL: https://github.com/apache/datafusion-comet/pull/804#issuecomment-2282244556
## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/804?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 33.87%. Comparing base [(`1374f2a`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/1374f2adc4e0f2cb28a2c45391fabf18e3239615?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`49bc11a`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/49bc11a8c6f31383e5bc389e8375fdeff3e45359?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 4 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #804 +/- ##
============================================
+ Coverage 33.78% 33.87% +0.08%
Complexity 870 870
============================================
Files 112 112
Lines 42792 42861 +69
Branches 9445 9460 +15
============================================
+ Hits 14459 14519 +60
- Misses 25355 25359 +4
- Partials 2978 2983 +5
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/804?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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