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

Different behavior for incompatible type comparison between SQL++ and N1QL.

    XMLWordPrintable

Details

    • Untriaged
    • No
    • CX Sprint 112, CX Sprint 113, CX Sprint 114, CX Sprint 115

    Description

      Different results between SQL++ and N1QL has been observed and analytics result is looking better wrt incompatible type comparisons.

      In N1QL where the comparison hits incompatible type, it seems it is evaluated it to True while in analytics it is evaluated it to False.

      Query: SELECT age FROM default where age > 1;

      Analytics Output:

      [
        {
          "age": 70
        },
      {
          "age": 33
        },
        {
          "age": 12345.12345
        }
      ]
      

      N1QL Output:

      [
        {
          "age": 70
        },
      {
          "age": 33
        },
        {
          "age": [
            1,
            2
          ]
        },
        {
          "age": {
            "key": "value"
          }
        },
        {
          "age": 12345.12345
        }
      ]
      

      Attachments

        1. data.json
          24 kB
          Ritesh Agarwal

        Issue Links

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

          Activity

            The Analytics result is the specified result for the converged query language. It is also the expected result for Vulcan.
            Deferring to Alice in case further discussion is needed.

            till Till Westmann added a comment - The Analytics result is the specified result for the converged query language. It is also the expected result for Vulcan. Deferring to Alice in case further discussion is needed.
            mike.carey Mike Carey added a comment -

            Technical nit:  In Analytics the comparison evaluates to NULL (not to TRUE) and then the WHERE predicate filters such cases (because only the TRUEs survive).

            mike.carey Mike Carey added a comment - Technical nit:  In Analytics the comparison evaluates to NULL (not to TRUE) and then the WHERE predicate filters such cases (because only the TRUEs survive).

            Move non-critical issues to the next release.

            till Till Westmann added a comment - Move non-critical issues to the next release.

            Re-triage issues for the next release.

            till Till Westmann added a comment - Re-triage issues for the next release.

            Removed from Alice, removing from sprint.

            till Till Westmann added a comment - Removed from Alice, removing from sprint.

            Not being addressed for Mad-Hatter, moving to Cheshire-Cat

            dmitry.lychagin Dmitry Lychagin (Inactive) added a comment - Not being addressed for Mad-Hatter, moving to Cheshire-Cat

            People

              till Till Westmann
              ritesh.agarwal Ritesh Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty