Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-48270

Need aggregate pushdowns with custom reduce using UDF

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 6.6.3, 7.0.2
    • feature-backlog
    • secondary-index
    • 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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no comments yet on this issue.

          People

            varun.velamuri Varun Velamuri
            jeelan.poola Jeelan Poola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty