Skip to content

constructing efficient interval scans from a list of dates and a per-date interval #6669

@nwoolmer

Description

@nwoolmer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrictionNew featureFeature requestsSQLIssues or changes relating to SQL execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions