Skip to content

[R] show_exec_plan() for an arrow_dplyr_query #30534

Closed

Description

@asfimport

{}Proposed approach{}: design doc

Steps

Reporter: Jonathan Keane / @jonkeane
Assignee: Dragoș Moldovan-Grünfeld / @dragosmg

Subtasks:

PRs and other links:

Note: This issue was originally created as ARROW-15016. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Feb 7, 2022

    @asfimport
    Author

    Dewey Dunnington / @paleolimbot:
    It seems like a route here would be to implement a ToString() and print() as R6 methods here:

    print.arrow_dplyr_query <- function(x, ...) {

    and here: https://github.com/apache/arrow/blob/master/r/src/compute-exec.cpp#L47

    ...and add a show_dplyr_query() function here (maybe like this):

    library(arrow, warn.conflicts = FALSE)
    library(dplyr, warn.conflicts = FALSE)
    
    show_exec_plan <- function(.data) {
      adq <- arrow:::as_adq(.data)
      plan <- arrow:::ExecPlan$create()
      final_node <- plan$Build(.data)
      print(plan$ToString())
      invisible(.data)
    }
    
    ggplot2::mpg %>% 
      arrow_table() %>% 
      filter(year > 2007) %>% 
      show_exec_plan()
    #> Error in print(plan$ToString()): attempt to apply non-function

    Maybe here:

    https://github.com/apache/arrow/blob/master/r/R/dplyr.R#L91

  2. asfimport commented on Jul 22, 2022

    @asfimport
    Author

    Dewey Dunnington / @paleolimbot:
    Issue resolved by pull request 13541
    #13541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions