Details
-
Improvement
-
Resolution: Unresolved
-
Critical
-
6.6.3, 7.0.2
-
None
-
1
Description
Couchbase views enables the customers to build customized reduce (aggregation) functions that pre-calculates the aggregation and is capable of returning aggregation results very fast.
With the upcoming deprecation of Couchbase Views, Couchbase has no real alternative for this feature since it supports only a pre-defined aggregation function (MAX, MIN, SUM, COUNT, AVG etc.) in N1QL-GSI
A custom aggregation function should be written in JS (as an external function) and/or in N1QL.
For deterministic functions, it would be great to be able to push them down to the indexer.
Competitive analysis:
MongoDB 4.4 added has this feature as described here: https://www.mongodb.com/developer/how-to/use-function-accumulator-operators/
PostgreSQL also has that feature: https://www.postgresql.org/docs/13/sql-createaggregate.html
MariaDB: https://mariadb.com/kb/en/stored-aggregate-functions/
SQL Server has that feature too (using an external dot net function):
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-aggregate-transact-sql?view=sql-server-ver15