duckdb-rs
duckdb-rs copied to clipboard
Conversion Error: Unimplemented type for cast (TIMESTAMP WITH TIME ZONE -> DATE) with feature bundled
Using a query casting a timestamp to date (WHERE ts::date = ?) this error is emitted:
Conversion Error: Unimplemented type for cast (TIMESTAMP WITH TIME ZONE -> DATE)
The same query is working when building without feature bundled. I've observed this in 1.1.1 and 1.2.0.
I too see this error with TIMESTAMP casting, although not exactly identical. I tried to build it without bundled but it doesn't help. I tried with v1.2.1 and with just released v1.2.2
Here's the error:
Unimplemented type for cast (TIMESTAMP WITH TIME ZONE -> STRUCT(generate_series TIMESTAMP WITH TIME ZONE))
Hello,
I had the same issue and I resolved it by loading ICU extension with the command LOAD icu.
Maybe icu should be added in bundled ?
Hello! Yes, I think this is because the ICU extension isn't part of the bundle. We usually ship ICU with the library on in other language ecosystems, and also try to auto-load ICU when we detect that the user tries to invoke a function included in it, but I don't think we do auto-loading for casts.
I tried including ICU in the bundle before, but unfortunately it causes the bundled source to exceed the size limit allowed by cargo.rs, even when compressed.
I finally documented this limitation in the README:
https://github.com/duckdb/duckdb-rs?tab=readme-ov-file#icu-extension-and-the-bundled-feature