Opened 11 years ago

Closed 11 years ago

#435 closed enhancement (fixed)

Change CASE to work with expressions in the THEN clause

Reported by: Vlad Merticariu Owned by: Vlad Merticariu
Priority: major Milestone: 8.5.1
Component: server Version: 8.5
Keywords: Cc: Peter Baumann
Complexity: Medium

Description

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

CASE WHEN condition THEN pointValue

ELSE pointValue

END

It should be changed to fit expressions as well:

CASE WHEN condition THEN expression

ELSE expression

END

so queries of the following form are accepted:

CASE WHEN c > 0 THEN log©

ELSE 0

END

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© 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 by Dimitar Misev, 11 years ago

Milestone: 8.5.1

comment:2 by Vlad Merticariu, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.