N1QL Query parses incorrectly

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]]]}

Activity

Show:

CB robot April 21, 2021 at 9:16 PM

Build couchbase-lite-net-3.0.0-47 contains couchbase-lite-core commit b3c09e2 with commit message:
Append "else null" to the case expression if the optional "else" is not provided. #CBL-1649 (#1151)

CB robot April 6, 2021 at 2:17 PM

Build couchbase-lite-ios-3.0.0-121 contains couchbase-lite-core commit b3c09e2 with commit message:
Append "else null" to the case expression if the optional "else" is not provided. #CBL-1649 (#1151)

CB robot April 2, 2021 at 6:58 PM

Build couchbase-lite-java-3.0.0-83 contains couchbase-lite-core commit b3c09e2 with commit message:
Append "else null" to the case expression if the optional "else" is not provided. #CBL-1649 (#1151)

CB robot April 2, 2021 at 6:43 PM

Build couchbase-lite-android-3.0.0-82 contains couchbase-lite-core commit b3c09e2 with commit message:
Append "else null" to the case expression if the optional "else" is not provided. #CBL-1649 (#1151)

CB robot April 2, 2021 at 2:52 AM

Build couchbase-lite-log-3.0.0-89 contains couchbase-lite-core commit b3c09e2 with commit message:
Append "else null" to the case expression if the optional "else" is not provided. #CBL-1649 (#1151)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created February 6, 2021 at 12:34 AM
Updated April 21, 2021 at 9:16 PM
Resolved April 1, 2021 at 11:45 PM
Instabug