Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-1649

N1QL Query parses incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.0
    • 3.0
    • LiteCore
    • Security Level: Public
    • None

    Description

      Query

      SELECT CASE WHEN 1+1=3 THEN 7+7 WHEN 2+2=5 THEN 8+8 END FROM scratch

      The above parses into the following incorrect JSON representation:

      {"FROM":[{"AS":"scratch"}],"WHAT":[["CASE",null,["=",["+",1,1],3],["+",7,7],["=",["+",2,2],5],["+",8,8]]]}
      

      Instead of the expected

      {"FROM":[{"AS":"scratch"}],"WHAT":[["CASE",["=",["+",1,1],3],["+",7,7],["=",["+",2,2],5],["+",8,8]]]}
      

      Attachments

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

        Activity

          People

            jianmin.zhao Jianmin Zhao
            jimb Jim Borden
            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