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

Allow user-defined inline functions to work in the community edition

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • No

    Description

      As of 7.0.0-3653, UDFs are not enabled to work on Community edition. The inline functions should work in Community edition in 7.0 as decided by PM and mentioned here - https://hub.internal.couchbase.com/confluence/pages/viewpage.action?spaceKey=PM&title=Couchbase+Server+Cheshire+Cat++-+Release+Requirements.

      This ticket is to track enabling the same in CE.

      It is understood that Javascript functions will not work in CE due to dependency on Eventing which is EE only.

      Attachments

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

        Activity

          Build couchbase-server-7.0.0-4025 contains query commit fd006bd with commit message:
          MB-42639 inline functions in ce

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-4025 contains query commit fd006bd with commit message: MB-42639 inline functions in ce

          Verified on build version:7.0.0-4198-community.

          create inline UDF:

           cbq> CREATE FUNCTION func2(degrees) LANGUAGE INLINE AS (degrees - 32);
          {
              "requestID": "20e5678a-1060-4483-a789-540160c15243",
              "signature": null,
              "results": [
              ],
              "status": "success",
              "metrics": {
                  "elapsedTime": "12.356359ms",
                  "executionTime": "12.153732ms",
                  "resultCount": 0,
                  "resultSize": 0,
                  "serviceLoad": 6
              }
          }
          cbq> select func2(40);
          {
              "requestID": "3681b2fc-1f8d-4726-8d67-c81813328655",
              "signature": {
                  "$1": "json"
              },
              "results": [
              {
                  "$1": 8
              }
              ],
              "status": "success",
              "metrics": {
                  "elapsedTime": "6.508184ms",
                  "executionTime": "6.270594ms",
                  "resultCount": 1,
                  "resultSize": 23,
                  "serviceLoad": 6
              }
          }
          
          

          create java UDF not supported:

           cbq> CREATE FUNCTION func1(a,b) LANGUAGE JAVASCRIPT AS "comparator" AT "strings";
          {
              "requestID": "c22140af-d62e-4d1d-994b-0e2031071422",
              "errors": [
                  {
                      "code": 3000,
                      "msg": "Functions of type javascript are only supported in Enterprise Edition - at \"strings\""
                  }
              ],
              "status": "fatal",
              "metrics": {
                  "elapsedTime": "1.914615ms",
                  "executionTime": "1.551219ms",
                  "resultCount": 0,
                  "resultSize": 0,
                  "serviceLoad": 6,
                  "errorCount": 1
              }
          }

          pierre.regazzoni Pierre Regazzoni added a comment - Verified on build version:7.0.0-4198-community. create inline UDF: cbq> CREATE FUNCTION func2(degrees) LANGUAGE INLINE AS (degrees - 32 ); {     "requestID" : "20e5678a-1060-4483-a789-540160c15243" ,     "signature" : null ,     "results" : [     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "12.356359ms" ,         "executionTime" : "12.153732ms" ,         "resultCount" : 0 ,         "resultSize" : 0 ,         "serviceLoad" : 6     } } cbq> select func2( 40 ); {     "requestID" : "3681b2fc-1f8d-4726-8d67-c81813328655" ,     "signature" : {         "$1" : "json"     },     "results" : [     {         "$1" : 8     }     ],     "status" : "success" ,     "metrics" : {         "elapsedTime" : "6.508184ms" ,         "executionTime" : "6.270594ms" ,         "resultCount" : 1 ,         "resultSize" : 23 ,         "serviceLoad" : 6     } } create java UDF not supported: cbq> CREATE FUNCTION func1(a,b) LANGUAGE JAVASCRIPT AS "comparator" AT "strings" ; {     "requestID" : "c22140af-d62e-4d1d-994b-0e2031071422" ,     "errors" : [         {             "code" : 3000 ,             "msg" : "Functions of type javascript are only supported in Enterprise Edition - at \"strings\""         }     ],     "status" : "fatal" ,     "metrics" : {         "elapsedTime" : "1.914615ms" ,         "executionTime" : "1.551219ms" ,         "resultCount" : 0 ,         "resultSize" : 0 ,         "serviceLoad" : 6 ,         "errorCount" : 1     } }

          People

            pierre.regazzoni Pierre Regazzoni
            mihir.kamdar Mihir Kamdar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty