Skip to content

MAP(BLOB, BLOB) type is not supported #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mgacc0 opened this issue Apr 18, 2025 · 1 comment
Open

MAP(BLOB, BLOB) type is not supported #697

mgacc0 opened this issue Apr 18, 2025 · 1 comment

Comments

@mgacc0
Copy link

mgacc0 commented Apr 18, 2025

    library(tidyverse)
    library(duckplyr)

    duckplyr::db_exec("COPY (SELECT 42 AS i, 84 AS j) TO 'xx.parquet';")
    duckplyr::read_sql_duckdb("SELECT * FROM parquet_metadata('xx.parquet');")
#> Error in `rel_to_df()`:
#> ! rel_to_altrep: Unknown column type for altrep: MAP(BLOB, BLOB)
#> ---
#> Backtrace:
#>     ▆
#>  1. └─duckplyr::read_sql_duckdb("SELECT * FROM parquet_metadata('xx.parquet');")
#>  2.   ├─duckplyr::rel_to_df(rel, prudence = prudence)
#>  3.   └─duckplyr:::rel_to_df.duckdb_relation(rel, prudence = prudence)
@krlmlr
Copy link
Member

krlmlr commented Apr 21, 2025

Thanks for raising this. The development version of duckdb is now telling us which column is affected.

It might take a while to support the MAP() type. In the meantime:

options(conflicts.policy = list(warn = FALSE))
library(duckplyr)
#> Loading required package: dplyr
#> ✔ Overwriting dplyr methods with duckplyr methods.
#> ℹ Turn off with `duckplyr::methods_restore()`.

db_exec("COPY (SELECT 42 AS i, 84 AS j) TO 'xx.parquet';")
read_sql_duckdb("SELECT * EXCLUDE key_value_metadata FROM parquet_metadata('xx.parquet');")
#> # A duckplyr data frame: 25 variables
#>   file_name  row_group_id row_group_num_rows row_group_num_columns
#>   <chr>             <dbl>              <dbl>                 <dbl>
#> 1 xx.parquet            0                  1                     2
#> 2 xx.parquet            0                  1                     2
#> # ℹ 21 more variables: row_group_bytes <dbl>, column_id <dbl>,
#> #   file_offset <dbl>, num_values <dbl>, path_in_schema <chr>, type <chr>,
#> #   stats_min <chr>, stats_max <chr>, stats_null_count <dbl>,
#> #   stats_distinct_count <dbl>, stats_min_value <chr>, stats_max_value <chr>,
#> #   compression <chr>, encodings <chr>, index_page_offset <dbl>,
#> #   dictionary_page_offset <dbl>, data_page_offset <dbl>,
#> #   total_compressed_size <dbl>, total_uncompressed_size <dbl>, …

Created on 2025-04-21 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants