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/10/19 18:40:50 UTC

[GitHub] [arrow] nealrichardson opened a new pull request, #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

nealrichardson opened a new pull request, #14461:
URL: https://github.com/apache/arrow/pull/14461

   Plus some refactoring and disentangling of compute/collect methods


-- 
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] wjones127 commented on a diff in pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

Posted by GitBox <gi...@apache.org>.
wjones127 commented on code in PR #14461:
URL: https://github.com/apache/arrow/pull/14461#discussion_r1003729797


##########
r/R/table.R:
##########
@@ -330,10 +330,22 @@ as_arrow_table.RecordBatchReader <- function(x, ...) {
   x$read_table()
 }
 
+#' @rdname as_arrow_table
+#' @export
+as_arrow_table.Dataset <- function(x, ...) {
+  Scanner$create(x)$ToTable()
+}

Review Comment:
   I know it's trivial, but could we add a quick test for this and `as.data.frame.Dataset`?



##########
r/R/metadata.R:
##########
@@ -77,7 +77,7 @@ apply_arrow_r_metadata <- function(x, r_metadata) {
         trace <- trace_back()
         # TODO: remove `trace$calls %||% trace$call` once rlang > 0.4.11 is released
         in_dplyr_collect <- any(map_lgl(trace$calls %||% trace$call, function(x) {
-          grepl("collect.arrow_dplyr_query", x, fixed = TRUE)[[1]]
+          grepl("collect\\.([aA]rrow|Dataset)", x)[[1]]

Review Comment:
   Is this codepath covered by a test?



-- 
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] ursabot commented on pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

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

   ['Python', 'R'] benchmarks have high level of regressions.
   [test-mac-arm](https://conbench.ursa.dev/compare/runs/378f7de954564223a550a5c698fc113a...9f55690d43304fc5918ff09b967da16b/)
   


-- 
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] nealrichardson merged pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

Posted by GitBox <gi...@apache.org>.
nealrichardson merged PR #14461:
URL: https://github.com/apache/arrow/pull/14461


-- 
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] github-actions[bot] commented on pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14461:
URL: https://github.com/apache/arrow/pull/14461#issuecomment-1284430904

   https://issues.apache.org/jira/browse/ARROW-15460


-- 
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] nealrichardson commented on a diff in pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

Posted by GitBox <gi...@apache.org>.
nealrichardson commented on code in PR #14461:
URL: https://github.com/apache/arrow/pull/14461#discussion_r1003756191


##########
r/R/metadata.R:
##########
@@ -77,7 +77,7 @@ apply_arrow_r_metadata <- function(x, r_metadata) {
         trace <- trace_back()
         # TODO: remove `trace$calls %||% trace$call` once rlang > 0.4.11 is released
         in_dplyr_collect <- any(map_lgl(trace$calls %||% trace$call, function(x) {
-          grepl("collect.arrow_dplyr_query", x, fixed = TRUE)[[1]]
+          grepl("collect\\.([aA]rrow|Dataset)", x)[[1]]

Review Comment:
   Yes, a test failed due to other changes and this was the fix.



-- 
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] ursabot commented on pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

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

   Benchmark runs are scheduled for baseline = f29be8020e828d0132efa14f024656de57d86134 and contender = 5e53978b56aa13f9c033f2e849cc22f2aed6e2d3. 5e53978b56aa13f9c033f2e849cc22f2aed6e2d3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/84a22c47cf9746f38f209eec6855a12b...a8804e12583b470b9be84ae4327b5504/)
   [Finished :arrow_down:11.88% :arrow_up:6.4%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/378f7de954564223a550a5c698fc113a...9f55690d43304fc5918ff09b967da16b/)
   [Finished :arrow_down:0.27% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/0512365f115d4a248bb5942e771bcb22...92468219ea0640d387b4aecb717050c1/)
   [Finished :arrow_down:0.21% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/a963b7198c6145edadc241d83a9bf839...49c15c511c8042c28afc0625994cce89/)
   Buildkite builds:
   [Finished] [`5e53978b` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/1814)
   [Finished] [`5e53978b` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/1836)
   [Finished] [`5e53978b` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/1802)
   [Finished] [`5e53978b` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/1828)
   [Finished] [`f29be802` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/1813)
   [Finished] [`f29be802` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/1835)
   [Finished] [`f29be802` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/1801)
   [Finished] [`f29be802` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/1827)
   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] nealrichardson commented on pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

Posted by GitBox <gi...@apache.org>.
nealrichardson commented on PR #14461:
URL: https://github.com/apache/arrow/pull/14461#issuecomment-1289612858

   > Changes seem reasonable, but I'm still not super familiar with the metadata stuff. So would like to see that encoded in the unit tests, if possible.
   
   The schema metadata stuff is already tested, I would guess mostly in test-metadata.R and test-dplyr-group-by.R. This change redirects some codepaths to go through it rather than relying on `arrow_dplyr_query` attributes.


-- 
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] nealrichardson commented on a diff in pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

Posted by GitBox <gi...@apache.org>.
nealrichardson commented on code in PR #14461:
URL: https://github.com/apache/arrow/pull/14461#discussion_r1003756381


##########
r/R/table.R:
##########
@@ -330,10 +330,22 @@ as_arrow_table.RecordBatchReader <- function(x, ...) {
   x$read_table()
 }
 
+#' @rdname as_arrow_table
+#' @export
+as_arrow_table.Dataset <- function(x, ...) {
+  Scanner$create(x)$ToTable()
+}

Review Comment:
   Yes good call



-- 
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