Trouble with DuckDB cast
Databases5 posts from 4 people4d active+00 posts in the last 7 days, 3 the 7 days before (fading)
Posts per day
The posts behind it
5, newest firstComparison simplification returns an incorrect result when a narrowing `DECIMAL` cast is used### What happens? `TRY_CAST(d AS DECIMAL(5,2)) > 1.00` returns the row `1234.00`, even though `TRY_CAST` maps that value to `NULL`. ### Expected result [2.00] ### Actual result [2.00, 1234.00] ### To Reproduce ### OS: Ubuntu 20.04 x86-64, docker image duckdb/duckdb:1.5.6 ###...duckdb/duckdb · dllggyx1 repliesOpen ↗VARIANT -> VARCHAR cast is 10-30x slower than VARIANT -> JSON -> VARCHAR and than the source STRUCT's VARCHAR cast### What happens? Casting a VARIANT to VARCHAR is far slower than every neighbouring path that produces equivalent text: 10-30x slower than `v::JSON::VARCHAR` on the same values and 30x slower than casting the STRUCT the VARIANT was built from. The cost is per value, independent...duckdb/duckdb · h4nsmullerOpen ↗to_aggregate_state() rejects an AGGREGATE_STATE input for DATE / TIMESTAMPTZ / TIME aggregates: Unimplemented type for cast (AGGREGATE_STATE -> DATE)### What happens `to_aggregate_state(value, name, signature)` accepts an exported `AGGREGATE_STATE` value as its `data` argument for some aggregate types but not others: a `max(BIGINT)` state passes through, a `max(DATE)` state fails in the binder with a cast error. Same for...duckdb/duckdb · h4nsmullerOpen ↗TRY_CAST of an empty BLOB to BIT escapes a non-fallible __cast and invalidates the database### What happens? *Found by an automated fuzzing/triage agent; the repro is verified, but the analysis may be wrong.* `SELECT TRY_CAST(''::BLOB AS BIT)` raises DuckDB's internal `__cast ... is not marked as fallible` error and invalidates the database instead of returning NULL....duckdb/duckdb · suyZhong1 repliesOpen ↗VARIANT: UPDATE of a deeply nested value is quadratic in depth (15 s at 5,000 levels), and the JSON -> VARIANT cast segfaults at ~40,000## Summary Two things, both only with a `VARIANT` holding very deeply nested JSON. This is an esoteric input, no real document looks like it, but it is 10-80 KB of text that anyone who can send JSON to a service can send, and the second one takes the process down. A depth limit...duckdb/duckdb · shreeveOpen ↗
Companies and products named
About this problem
Evidence
5 posts from 4 people in 1 place, about 1 a week over 23 days. Mostly on duckdb/duckdb. Tools named alongside: Docker, AWS.
Frustration Frustration 0 of 3· Seen on GitHub issues
How it was grouped
Posts about DuckDB with no known issue, sharing the word "cast". First post Sep 21, 2026, latest Oct 13, 2026. Corroborated: 3 or more posts from 2 or more people or places. Method
Other DuckDB problems
DuckDB upgrades break working setupsDuckDB users keep filing bugsTrouble with DuckDB columnTrouble with DuckDB overflowDuckDB error messages are crypticTrouble with DuckDB internalTrouble with DuckDB nullTrouble with DuckDB valuesTrouble with DuckDB resultDuckDB runs out of memoryDuckDB costs outgrow the value it givesDuckDB permissions are confusing and error-prone
History
steady to fading
rising to steady
unverified to corroborated
fading to rising
new to fading
Trouble with DuckDB cast (1 post)