-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
To reproduce
Whenever I try to manipulate an intermediate table with filled rows, the ones that have been filled seem to disappear.
In order to easily reproduce the behavior, you can create a dummy table:
CREATE TABLE weather (
ts TIMESTAMP,
temperature DOUBLE,
humidity INTEGER
) TIMESTAMP(ts);
INSERT INTO weather (ts, temperature, humidity) VALUES
('2024-01-01T00:00:00Z', 10.0, 10),
('2024-01-01T00:03:00Z', 11.5, 11),
('2024-01-01T00:04:00Z', 12.0, 12),
('2024-01-01T00:07:00Z', 13.0, 13);Imputing the missing rows with this query will give the expected behavior:
SELECT
ts,
last(temperature) AS temperature,
last(humidity) As humidity
FROM weather
SAMPLE BY 1m FILL(prev)
While this nested query will not:
WITH imputed AS (
SELECT
ts,
last(temperature) AS temperature,
last(humidity) As humidity
FROM weather
SAMPLE BY 1m FILL(prev)
)
SELECT ts, humidity
FROM imputed
To make things even more interesting, replacing humidity by temperature will work:
WITH imputed AS (
SELECT
ts,
last(temperature) AS temperature,
last(humidity) As humidity
FROM weather
SAMPLE BY 1m FILL(prev)
)
SELECT ts, temperature
FROM imputed
QuestDB version:
9.1.0
OS, in case of Docker specify Docker and the Host OS:
Ubuntu 24.04 (Docker)
File System, in case of Docker specify Host File System:
ext4
Full Name:
Abel Garcia Penas
Affiliation:
N/A
Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?
- Yes, I have
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels