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

"Select IFINF(2,1/0);" return 2 in N1QL but arithmetic error in analytics.

    XMLWordPrintable

Details

    • Untriaged
    • No
    • CX Sprint 96, CX Sprint 97, CX Sprint 112, CX Sprint 113

    Description

      As per definition in N1QL for IFINF(expression1, expression2, ...):
      Returns first non-MISSING, non-Inf number. Returns MISSING or NULL if a non-number input is encountered first.

      Select IFINF(2,1/0); In this statement the first input is a number and second is an infinite value.
      N1QL returns 2 but analytics gives an error:

      [

      { "code": 1, "msg": "Exception: java.lang.ArithmeticException: Division by Zero.", "query_from_user": "select IFINF(2,1/0)" }

      ]

      Attachments

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

        Activity

          People

            dmitry.lychagin Dmitry Lychagin (Inactive)
            ritesh.agarwal Ritesh Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty