-
Notifications
You must be signed in to change notification settings - Fork 1.6k
constructing efficient interval scans from a list of dates and a per-date interval #6669
Copy link
Copy link
Closed
Labels
FrictionNew featureFeature requestsFeature requestsSQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution
Description
Is your feature request related to a problem?
I have:
('2025-01-01', '2025-01-05', '2025-01-013')
This is bound to an IN like this:
WHERE foo IN ('2025-01-01', '2025-01-05', '2025-01-13')There is an extant bug/missing feature, where this will not be converted into a list of intervals: #6668
I would like to take this list of dates, but additionally constrain them to the range 0930-1600. i.e.
select min(timestamp), max(timestamp) FROM trades WHERE timestamp IN '2025-01-01T09:30;389m';which gives:
| min(timestamp) | max(timestamp) |
|---|---|
| 2025-01-01T09:30:00.048000Z | 2025-01-01T15:59:59.984000Z |
Describe the solution you'd like.
At the moment, you cannot add intervals together, nor broadcast an operation across such a bound list.
Describe alternatives you've considered.
JOINs
Full Name:
Nick Woolmer
Affiliation:
QuestDB
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrictionNew featureFeature requestsFeature requestsSQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution