R/explain.R

Defines functions explain.duckplyr_df

#' @export
explain.duckplyr_df <- function(x, ...) {
  rel_try(list(name = "explain", x = x),
    "No restrictions" = FALSE,
    {
      rel <- duckdb_rel_from_df(x)
      rel_explain(rel)
      return(invisible())
    }
  )

  writeLines("Can't convert to relational, fallback implementation will be used.")
  invisible()
}
duckdblabs/duckplyr documentation built on Nov. 6, 2024, 10 p.m.