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

ORDER BY direction and NULLS position inside UDF should accept a parameter

    XMLWordPrintable

Details

    • 0

    Description

      create or replace function p1 (poby, pobyd, po, pl) {(SELECT d.* FROM [{"abc":10}, {"abc":8}, {"abc":6}, {"abc":1}] AS d ORDER BY d.[poby] pobyd OFFSET po LIMIT pl)};
      

      Above one doesn't work. We only take $pobyd or $0
      It is good accept like LIMIT/OFFSET

       
      Due to parser conflicts, syntactically allow only the usage of function parameters as 'identifiers'.

      https://github.com/couchbase/query/blob/70b6b24b400bb065e2a20ab7be47eb7541bdace8/parser/n1ql/n1ql.y#L2070
      https://github.com/couchbase/query/blob/70b6b24b400bb065e2a20ab7be47eb7541bdace8/parser/n1ql/n1ql.y#L2092

      Check if the direction and nulls position is a static expression and if not return an error.

      Attachments

        For Gerrit Dashboard: MB-61260
        # Subject Branch Project Status CR V

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty