Use sd_compute() to collect and return the result as a DataFrame; use sd_collect() to collect and return the result as an R data.frame.

sd_compute(.data)

sd_collect(.data, ptype = NULL)

Arguments

.data

A sedonadb_dataframe or an object that can be coerced to one.

ptype

The target R object. See nanoarrow::convert_array_stream.

Value

sd_compute() returns a sedonadb_dataframe; sd_collect() returns a data.frame (or subclass according to ptype).

Examples

sd_sql("SELECT 1 as one") |> sd_compute()
#> <sedonab_dataframe: ?? x 1>
#> ┌───────┐
#> │  one  │
#> │ int64 │
#> ╞═══════╡
#> │     1 │
#> └───────┘
#> Preview of up to 6 row(s)
sd_sql("SELECT 1 as one") |> sd_collect()
#>   one
#> 1   1