You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/23 15:02:33 UTC

[GitHub] [arrow-rs] alamb opened a new pull request, #3173: Add RowSelection::iter(), Into> and example

alamb opened a new pull request, #3173:
URL: https://github.com/apache/arrow-rs/pull/3173

   # Which issue does this PR close?
   
   Closes https://github.com/apache/arrow-rs/issues/3172
   
   # Rationale for this change
    
   see https://github.com/apache/arrow-rs/issues/3172 (Datafusion code wants to count the number of selected items)
   
   # What changes are included in this PR?
   
   1. Add `RowSelection::iter()`
   2. Add `Into<Vec<RowSelector>>` (there was only into VecDeque for some reason)
   3. Add a Doc example
   
   # Are there any user-facing changes?
   
   
   new functions and docs


-- 
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@arrow.apache.org

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


[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3173: Add `RowSelection::iter()`, `Into>` and example

Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #3173:
URL: https://github.com/apache/arrow-rs/pull/3173#discussion_r1030787586


##########
parquet/src/arrow/arrow_reader/selection.rs:
##########
@@ -347,6 +370,12 @@ impl RowSelection {
         }
         self
     }
+
+    /// Returns an iterator over the [`RowSelector`]s for this
+    /// [`RowSelection`].
+    pub fn iter(&self) -> impl Iterator<Item = &RowSelector> {
+        self.selectors.iter()

Review Comment:
   Not especially, was just an idle suggestion



-- 
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@arrow.apache.org

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


[GitHub] [arrow-rs] tustvold merged pull request #3173: Add `RowSelection::iter()`, `Into>` and example

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #3173:
URL: https://github.com/apache/arrow-rs/pull/3173


-- 
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@arrow.apache.org

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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #3173: Add `RowSelection::iter()`, `Into>` and example

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3173:
URL: https://github.com/apache/arrow-rs/pull/3173#discussion_r1030732878


##########
parquet/src/arrow/arrow_reader/selection.rs:
##########
@@ -347,6 +370,12 @@ impl RowSelection {
         }
         self
     }
+
+    /// Returns an iterator over the [`RowSelector`]s for this
+    /// [`RowSelection`].
+    pub fn iter(&self) -> impl Iterator<Item = &RowSelector> {
+        self.selectors.iter()

Review Comment:
   Is there any reason to copy the RowSelectors around? 



-- 
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@arrow.apache.org

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


[GitHub] [arrow-rs] ursabot commented on pull request #3173: Add `RowSelection::iter()`, `Into>` and example

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3173:
URL: https://github.com/apache/arrow-rs/pull/3173#issuecomment-1325535523

   Benchmark runs are scheduled for baseline = f749e1d9f19a5da9249b8e1d2429b10acde97805 and contender = cea5146b69b3413a1d5caa946e0774ec8d834e95. cea5146b69b3413a1d5caa946e0774ec8d834e95 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/1848eea8972c49c2bd4c7d81d81d1a1e...8e193d8575de4553a36e0acbbdbf9e14/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/df560e7794d64c3eaddca1ffbbc8a04b...6182336dfac14d5a9c3bb4a0052fb237/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/9396dc7146d74fec9410281f56a57d70...3e71d029648a4aea8eb6bf0e08508a5f/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/dc566d5e8e6b40a085e82e18b5ddb0b2...62263a24b2fa4ac4ba6c19815be7bca9/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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@arrow.apache.org

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


[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3173: Add `RowSelection::iter()`, `Into>` and example

Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #3173:
URL: https://github.com/apache/arrow-rs/pull/3173#discussion_r1030636317


##########
parquet/src/arrow/arrow_reader/selection.rs:
##########
@@ -347,6 +370,12 @@ impl RowSelection {
         }
         self
     }
+
+    /// Returns an iterator over the [`RowSelector`]s for this
+    /// [`RowSelection`].
+    pub fn iter(&self) -> impl Iterator<Item = &RowSelector> {
+        self.selectors.iter()

Review Comment:
   ```suggestion
       pub fn iter(&self) -> impl Iterator<Item = RowSelector> {
           self.selectors.iter().copied()
   ```



-- 
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@arrow.apache.org

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