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
PostgreSQL version (output of SELECT version();): 14.5
TimescaleDB Toolkit version (output of \dx timescaledb_toolkit in psql): 1.11.0
Installation method: "Timescale Cloud"
Describe the bug
Running the same query involving OHLC returns different results from run to run.
To Reproduce
Query involving more than one company:
SELECT time_bucket('1 hour'::interval, "time") AS ts,
symbol,
toolkit_experimental.open(toolkit_experimental.ohlc("time", price))
FROM stocks_real_time
GROUP BY ts, symbol;
There are at least two issues here:
The same opening price is returned for different companies, which is just wrong.
Different opening prices are returned from the same company from run to run.
Query involving only one company:
SELECT time_bucket('1 hour'::interval, "time") AS ts,
symbol,
toolkit_experimental.open(toolkit_experimental.ohlc("time", price))
FROM stocks_real_time
WHERE symbol IN ('AAPL')
GROUP BY ts, symbol;
Even restricting the query to just one company, from run to run, different opening prices are returned for the same time.
Additional context
Reported initially by @zseta , If no accessor (toolkit_experimental.open()) is specified, this query
SELECT time_bucket('1 minute'::interval, "time") AS ts,
symbol,
toolkit_experimental.ohlc("time", price)
FROM stocks_real_time
GROUP BY ts, symbol;
returns error:
ERROR: timestamp out of range
CONTEXT: extension/src/serialization.rs:39:13
The text was updated successfully, but these errors were encountered:
624: Remove partial aggregation for Candlestick aggregates r=rtwalker a=rtwalker
Putting this here as an option for putting out a patch release until we have a proper fix for #611.
We've determined that the cause for the bad results lives somewhere in the functions that are used to support partial aggregation. We can at least prevent folks from running the candlestick aggregates in parallel mode and hitting this bug by dropping support for partial aggregation until we've resolved the issue.
Co-authored-by: Ryan Walker <rwalker@timescale.com>
Relevant system information:
SELECT version();
): 14.5\dx timescaledb_toolkit
inpsql
): 1.11.0Describe the bug
Running the same query involving OHLC returns different results from run to run.
To Reproduce
Query involving more than one company:
There are at least two issues here:
Query involving only one company:
Even restricting the query to just one company, from run to run, different opening prices are returned for the same time.
Additional context
Reported initially by @zseta , If no accessor (
toolkit_experimental.open()
) is specified, this queryreturns error:
The text was updated successfully, but these errors were encountered: