Replies: 1 comment
-
Thanks. I see the same behavior with plain SQL: library(duckdb)
#> Loading required package: DBI
# ducklake
con <- dbConnect(duckdb())
dbExecute(
con,
"INSTALL ducklake;
ATTACH 'ducklake:metadata.ducklake' AS my_ducklake (DATA_PATH 'data_files');
USE my_ducklake;"
)
#> [1] 0
dbExecute(con, "CREATE TABLE demo (letters ENUM('a', 'b', 'c', 'd'))")
#> Error in `duckdb_result()` at duckdb-r/R/dbSendQuery__duckdb_connection_character.R:16:3:
#> ! rapi_execute: Failed to run query
#> Error: Invalid Input Error: Failed to convert DuckDB type to DuckLake - unsupported type ENUM('a', 'b', 'c', 'd') Created on 2025-06-17 with reprex v2.1.1 I don't see how dictionary encoding is related. Can you please raise upstream if needed? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to write a data.frame with a factor column to a
ducklake
, but I am getting an error - perhaps the ENUM type is not (yet?) supported?When I write a data.frame frame to a regular
duckdb
database, the factor column is stored as an ENUM type.But when I try to write the same data.frame to a
ducklake
, the operation failsand I get the following error:
I suspect that
ducklake
might simply not support the ENUM type, yet, as per its documentation. But I think parquet files offer a dictionary encoding, and - if I remember correctly - thearrow
R package coerces R factors into dictionaries. Is there a way to do that in the context of aducklake
? Or maybe that's on the roadmap?Many thanks for developing these awesome tools for the R community!
Beta Was this translation helpful? Give feedback.
All reactions