duckdb-rs icon indicating copy to clipboard operation
duckdb-rs copied to clipboard

Conversion Error: Unimplemented type for cast (TIMESTAMP WITH TIME ZONE -> DATE) with feature bundled

Open pka opened this issue 9 months ago • 1 comments

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.

pka avatar Feb 28 '25 17:02 pka

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))

singh-beant avatar Apr 11 '25 21:04 singh-beant

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 ?

blackrez avatar Aug 03 '25 17:08 blackrez

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.

Maxxen avatar Aug 03 '25 18:08 Maxxen

I finally documented this limitation in the README:

https://github.com/duckdb/duckdb-rs?tab=readme-ov-file#icu-extension-and-the-bundled-feature

mlafeldt avatar Oct 29 '25 10:10 mlafeldt