-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time_weight OrderError #794
Comments
I'm running into what seems to be the same issue and get
as a response to my query. OS: Debian 12.2 Query:
Interestingly, making a simple change by adding
to the end of the query allows it to run and give the correct answer. Also, I am able to run the query against shorter sequences of data and do not need the additional GROUP BY. The query that has problems looks at 201939 rows. Update:
first. Setting this variable also causes the execution plan to change as well, dropping the "Gather" step. |
Same issue here.
Query:
ERROR: called The suggestion of @wiboticalex really did work, but it's not really a viable fix for production workflows. Best regards |
Relevant system information:
Describe the bug
time_weight fails with error in console and in C# with Npgsql but actually works fine in DBeaver 24.0.0.
To Reproduce
Query:
SELECT average(time_weight('LOCF', time, e5)) as e5 FROM prices WHERE time >= CURRENT_DATE - 1 AND time < CURRENT_DATE;
DDL:
-- hypertable
SELECT create_hypertable('prices', 'time');
-- default index created by timescaledb
CREATE INDEX prices_time_idx ON prices USING btree ("time" DESC);
-- additional index for faster queries by id and time
CREATE INDEX prices_id_time_idx ON prices USING btree (id ASC, "time" DESC);
Expected behavior
A floating point number like 1.836 (like in DBeaver)
Actual behavior
The text was updated successfully, but these errors were encountered: