diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-03 11:20:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-03 11:20:42 +0200 |
| commit | 8762a54a74da48b304e49e23bd2b2eeb8f541f67 (patch) | |
| tree | bba472803a19e370fcf24fe7d7c7f7b6c343f323 /internal/mapr/selectcondition.go | |
| parent | 77661ef1c646a5ef8e6964afa5571c756d1fd31d (diff) | |
Add percentage and percentile mapr aggregators
Diffstat (limited to 'internal/mapr/selectcondition.go')
| -rw-r--r-- | internal/mapr/selectcondition.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/mapr/selectcondition.go b/internal/mapr/selectcondition.go index 78359c7..3ea4355 100644 --- a/internal/mapr/selectcondition.go +++ b/internal/mapr/selectcondition.go @@ -19,6 +19,8 @@ const ( Last AggregateOperation = iota Avg AggregateOperation = iota Len AggregateOperation = iota + Percentage AggregateOperation = iota + Percentile AggregateOperation = iota ) // Represents a parsed "select" clause, used by mapr.Query. @@ -81,6 +83,10 @@ func makeSelectConditions(tokens []token) ([]selectCondition, error) { sc.Operation = Avg case "len": sc.Operation = Len + case "percentage": + sc.Operation = Percentage + case "percentile": + sc.Operation = Percentile default: return sc, errors.New(invalidQuery + "Unknown aggregation in 'select' clause: " + agg) } |
