Description
This query
SELECT (CASE 3 WHEN TRUE THEN 1 ELSE 2 END);
and this query
SELECT (CASE null WHEN TRUE THEN 1 ELSE 2 END);
Return results when run through CBQ-shell, however they hang when run through the query workbench. (I have an empty bucket and a primary index on that empty bucket on the server and nothing else).
cbq> SELECT (CASE 3 WHEN TRUE THEN 1 ELSE 2 END);
{
"requestID": "a3a81868-65e3-46bf-bdbe-38cab01180ba",
"signature": {
"$1": "number"
},
"results": [
{
"$1": 2
}
],
"status": "success",
"metrics": {
"elapsedTime": "386.687µs",
"executionTime": "377.471µs",
"resultCount": 1,
"resultSize": 31
}
}
cbq> SELECT (CASE null WHEN TRUE THEN 1 ELSE 2 END);
{
"requestID": "06468537-61e6-46c5-babe-36cc07cdbae8",
"signature": {
"$1": "number"
},
"results": [
{
"$1": 2
}
],
"status": "success",
"metrics": {
"elapsedTime": "503.7µs",
"executionTime": "491.174µs",
"resultCount": 1,
"resultSize": 31
}
}