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
Omitting columns in the test inputs doesn't work in particular cases #1786
In row #1, the columns name and quantity are omitted.
In row #2, the column quantity is omitted.
When running this test, I get the following error:
duckdb.duckdb.ConversionException: Conversion Error: Could not convert string "hello" to DECIMAL(38,9)
If I swap the order of rows #1 and #2 (in both the inputs and expected outputs) everything works fine.
⇨ it seems to work if the larger subset of columns appears first in the inputs.
Analysis
When rendering the fixture view used to mock the model1 data, the generated query is the following:
SELECT
CAST(id ASINT) AS id,
CAST(name ASVARCHAR) AS name,
CAST(price ASDECIMAL(38, 9)) AS price,
CAST(quantity ASDECIMAL(38, 9)) AS quantity
FROM (
VALUES(
1234, -- id0.1, -- quantity instead of nameNULL,
NULL
), (
9876, -- id0.2, -- quantity instead of nameNULL,
'hello'-- name instead of quantity
)
) AS t(id, name, price, quantity)
We can see that there is a mismatch in the order of the non-omitted columns specified in the inputs and the values used in the fixture query.
Activity
georgesittas commentedon Dec 3, 2023
@pcasteran thanks for the great report - this has been fixed in 5739510 and will be included in the next release.