tidyverse/duckplyr

`head(-1)`

Closed this issue · 1 comments

data.frame(a = 1:5) |>
  duckplyr::as_duckplyr_df() |>
  head(-2)
#> materializing:
#> ---------------------
#> --- Relation Tree ---
#> ---------------------
#> Limit -2
#>   r_dataframe_scan(0x12b3f74f0)
#> 
#> ---------------------
#> -- Result Columns  --
#> ---------------------
#> - a (INTEGER)
#> 
#>   a
#> 1 1
#> 2 2
#> 3 3
#> 4 4
#> 5 5

data.frame(a = 1:5) |>
  head(-2)
#>   a
#> 1 1
#> 2 2
#> 3 3

Created on 2024-04-02 with reprex v2.1.0

Are we actually doing the right thing in head() ? Because this is used in tibble printing, perhaps we want to materialize the full result here and do the head() ourselves?