Skip to content

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Dec 11, 2022

Two tests currently fail:

pkgload::load_all()
#> ℹ Loading duckplyr

df <- tibble(g = c(1, 1, 2, 2, 2), x = 1:5)

duckplyr_summarise(df, out = !!1)
#> materializing:
#> ---------------------
#> --- Relation Tree ---
#> ---------------------
#> Aggregate [1.0]
#>   r_dataframe_scan(0x107a96648)
#> 
#> ---------------------
#> -- Result Columns  --
#> ---------------------
#> - out (DOUBLE)
#> 
#> # A tibble: 5 × 1
#>     out
#>   <dbl>
#> 1     1
#> 2     1
#> 3     1
#> 4     1
#> 5     1
summarise(df, out = !!1)
#> # A tibble: 1 × 1
#>     out
#>   <dbl>
#> 1     1

duckplyr_summarise(df, out = !!quo(1))
#> materializing:
#> ---------------------
#> --- Relation Tree ---
#> ---------------------
#> Aggregate [1.0]
#>   r_dataframe_scan(0x125943b48)
#> 
#> ---------------------
#> -- Result Columns  --
#> ---------------------
#> - out (DOUBLE)
#> 
#> # A tibble: 5 × 1
#>     out
#>   <dbl>
#> 1     1
#> 2     1
#> 3     1
#> 4     1
#> 5     1
summarise(df, out = !!quo(1))
#> # A tibble: 1 × 1
#>     out
#>   <dbl>
#> 1     1

Created on 2022-12-11 with reprex v2.0.2

@krlmlr
Copy link
Member Author

krlmlr commented Dec 12, 2022

Better reprex:

pkgload::load_all()
#> ℹ Loading duckplyr

df <- tibble(g = c(1, 1, 2, 2, 2), x = 1:5)

duckplyr_summarise(df, out = sum(x))
#> materializing:
#> ---------------------
#> --- Relation Tree ---
#> ---------------------
#> Aggregate [sum(x)]
#>   r_dataframe_scan(0x107915988)
#> 
#> ---------------------
#> -- Result Columns  --
#> ---------------------
#> - out (HUGEINT)
#> 
#> # A tibble: 1 × 1
#>     out
#>   <dbl>
#> 1    15
summarise(df, out = sum(x))
#> # A tibble: 1 × 1
#>     out
#>   <int>
#> 1    15

duckplyr_summarise(df, .by = g, out = 1)
#> materializing:
#> ---------------------
#> --- Relation Tree ---
#> ---------------------
#> Aggregate [g, 1.0]
#>   r_dataframe_scan(0x126678ec8)
#> 
#> ---------------------
#> -- Result Columns  --
#> ---------------------
#> - g (DOUBLE)
#> - out (DOUBLE)
#> 
#> # A tibble: 2 × 2
#>       g   out
#>   <dbl> <dbl>
#> 1     1     1
#> 2     2     1
summarise(df, .by = g, out = 1)
#> # A tibble: 2 × 2
#>       g   out
#>   <dbl> <dbl>
#> 1     1     1
#> 2     2     1

duckplyr_summarise(df, out = 1)
#> materializing:
#> ---------------------
#> --- Relation Tree ---
#> ---------------------
#> Aggregate [1.0]
#>   r_dataframe_scan(0x107aebb08)
#> 
#> ---------------------
#> -- Result Columns  --
#> ---------------------
#> - out (DOUBLE)
#> 
#> # A tibble: 5 × 1
#>     out
#>   <dbl>
#> 1     1
#> 2     1
#> 3     1
#> 4     1
#> 5     1
summarise(df, out = 1)
#> # A tibble: 1 × 1
#>     out
#>   <dbl>
#> 1     1

Created on 2022-12-12 with reprex v2.0.2

@krlmlr
Copy link
Member Author

krlmlr commented Jan 5, 2023

Tests fixed when using Tmonster/duckdb#13.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant