You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
values() creates one row of arrays instead of multiple rows #407
I believe this behavior is a bug and not actually intended, but I may be wrong.
duckdb.values([(10, 'A'), (20, 'B')]) produces a table with one row of VARCHAR[] values, instead of a table with two rows and two columns with different types.
Other alternatives like:
duckdb.values((10, 'A'), (20, 'B'))
duckdb.values("(10, 'A'), (20, 'B')")
just fail.
To Reproduce
duckdb.values([(10, 'A'), (20, 'B')]).df()
OS:
macOS Tahoe
DuckDB Package Version:
1.5.1
Python Version:
3.12.13
Full Name:
Carlos
Affiliation:
Mutt
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have not tested with any build
Did you include all relevant data sets for reproducing the issue?
No - Other reason (please specify in the issue body)
Did you include all code required to reproduce the issue?
Yes, I have
Did you include all relevant configuration to reproduce the issue?
Thanks for the report. A single list passed to values() is one row by design, so each tuple in it becomes one list value; that is why you see VARCHAR[] columns. You were right that the other spellings were broken: on 1.5.1 and 1.5.2 duckdb.values((10, 'A'), (20, 'B')) raised a Binder Error. Since 2.0.0 it works, and so does duckdb.values(*rows), both giving two rows of (INTEGER, VARCHAR); I checked on 2.0.0 and on main. A SQL string is one VARCHAR value, so for SQL text use duckdb.sql("FROM (VALUES (10, 'A'), (20, 'B'))").
Activity
evertlammerts commentedon Oct 27, 2026
Thanks for the report. A single list passed to values() is one row by design, so each tuple in it becomes one list value; that is why you see VARCHAR[] columns. You were right that the other spellings were broken: on 1.5.1 and 1.5.2 duckdb.values((10, 'A'), (20, 'B')) raised a Binder Error. Since 2.0.0 it works, and so does duckdb.values(*rows), both giving two rows of (INTEGER, VARCHAR); I checked on 2.0.0 and on main. A SQL string is one VARCHAR value, so for SQL text use duckdb.sql("FROM (VALUES (10, 'A'), (20, 'B'))").