Skip to content

union_all() materializes on logical() columns #933

Description

@valentingar

When trying to combine two duckplyr_df together that have columns of type logical(), materialization appears to be forced.

library(duckplyr)
#> Warning: package 'duckplyr' was built under R version 4.5.3
#> Loading required package: dplyr
#> Warning: package 'dplyr' was built under R version 4.5.3
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
#> The duckplyr package is configured to fall back to dplyr when it encounters an
#> incompatibility. Fallback events can be collected and uploaded for analysis to
#> guide future development. By default, data will be collected but no data will
#> be uploaded.
#> ℹ Automatic fallback uploading is not controlled and therefore disabled, see
#>   `?duckplyr::fallback()`.
#> ✔ Number of reports ready for upload: 1.
#> → Review with `duckplyr::fallback_review()`, upload with
#>   `duckplyr::fallback_upload()`.
#> ℹ Configure automatic uploading with `duckplyr::fallback_config()`.
#> ✔ Overwriting dplyr methods with duckplyr methods.
#> ℹ Turn off with `duckplyr::methods_restore()`.
    
    df1 <-
        tibble(a = c(1,2,3),
               logic_col = c(TRUE, FALSE, TRUE)
        ) |>
        as_duckdb_tibble(prudence = "stingy")
    
    df2 <-
        tibble(a = c(4,5,6),
               logic_col = c(TRUE, FALSE, TRUE)
        ) |>
        as_duckdb_tibble(prudence = "stingy")
    
    union_all(df1, df2)
#> Error:
#> ! Failed to evaluate glue component {vec_ptype_full(x_i)}
#> Caused by error:
#> ! Materialization is disabled, use `collect()` or `as_tibble()` to materialize.
#> ℹ Context: GetQueryResult

Created on 2026-07-01 with reprex v2.1.1

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions