Opened 4 years ago

Closed 4 years ago

#435 closed enhancement (fixed)

Change CASE to work with expressions in the THEN clause

Reported by: vmerticariu Owned by: vmerticariu
Priority: major Milestone: 8.5.1
Component: server Version: 8.5
Keywords: Cc: pbaumann
Complexity: Medium


The CASE statement only accepts point values in the THEN and ELSE clauses:

CASE WHEN condition THEN pointValue

ELSE pointValue


It should be changed to fit expressions as well:

CASE WHEN condition THEN expression

ELSE expression


so queries of the following form are accepted:

CASE WHEN c > 0 THEN log(c)



Whenever an expression is given in the THEN clause, the array input of the operation should be removed and instead a point-by-point execution should be performed. This is necessary for allowing conditional evaluation: log(c) would fail if evaluated on the entire array, if the array contains points with values <= 0. Cell basis execution ensures that only the points passing the condition in the WHEN statement are considered.

Change History (2)

comment:1 Changed 4 years ago by dmisev

  • Milestone set to 8.5.1

comment:2 Changed 4 years ago by vmerticariu

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.