Closed coroa closed 1 day ago
This seems to be related to https://github.com/duckdb/duckdb/issues/9720 .
At least it can be worked around in a similar manner by including the row_number
windowing function into the cross-joined sub-queries:
SELECT
x,
COALESCE(
y,
(
SELECT
prev.y + ( (next.y - prev.y) * (parent.x - prev.x) / (next.x - prev.x) )
FROM
( SELECT x, y, ROW_NUMBER() OVER (ORDER BY x DESC) as rn FROM df WHERE x <= parent.x and y is not null ) AS prev
CROSS JOIN
( SELECT x, y, ROW_NUMBER() OVER (ORDER BY x ASC) as rn FROM df WHERE x >= parent.x and y is not null ) AS next
WHERE
prev.rn = 1 AND next.rn = 1
)
) AS y
FROM
df parent
Thanks to https://stackoverflow.com/a/77588520/2873952 for realizing the link and workaround.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
The error does seem to have been fixed for 1.0.0. At least i cannot reproduce it anymore on the latest version.
What happens?
When trying to fill in null values in a small table with linear interpolation, then a fatal error
is raised and invalidates the in-memory database.
The same SQL query runs fine on Postgres: https://dbfiddle.uk/3anzk06a
I am relatively new to writing more complex SQL queries, apologies in advance, if i am making obvious mistakes.
To Reproduce
so that:
then:
and
OS:
DuckDB Web Shell
DuckDB Version:
0.9.2
DuckDB Client:
WASM
Full Name:
Jonas Hörsch
Affiliation:
Climate Analytics
Have you tried this on the latest
main
branch?I have tested only with a release build on website and with the python client.
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?