Skip to content

feat(sql-utilities): Support multiple SELECT projections alongside a single aggregate function #361

Description

@akanksha-akkihal

ASAPQuery's SQL parser currently requires the SELECT clause to contain exactly one projection item i.e. the aggregate function. Any query that names group-by columns alongside the aggregate is rejected.

Currently Supported -
SELECT quantile(0.99)(pkt_len) AS p99_pkt_len FROM netflow_table GROUP BY proto, srcip, dstip

Needed Support -
Standard SQL grouped aggregate queries should also be supported.
SELECT proto, srcip, dstip, quantile(0.99)(pkt_len) AS p99_pkt_len FROM netflow_table GROUP BY proto, srcip, dstip

Scope
This change is limited to the sql_utilities parser. No execution or aggregation logic needs to change. Once parsed, a query with multiple projection columns should behave exactly the same as the current single-aggregate form, using the existing group-by labels and precomputed aggregation lookup path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions