Opened 8 years ago

Closed 8 years ago

#1332 closed defect (fixed)

WCPS1.5_Handle switch case

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

Current WCPS 1.5 does not handle "switch case".

Some tests in WCSP 1.0

74-switch_scalar.test

for c in (mr) return encode(
switch case c > 20 
return (char)2 
case c>10 
return (char)1 
default return (char)0 
,"csv")

with Rasql query in WCPS 1.0

select csv(
case when ((c)>(20)) 
then (octet)(2) 
when ((c)>(10)) 
then (octet)(1) 
else (octet)(0) end) 
from mr AS c 
where oid(c)=1025

75-switch_array.test

for c in (mr) 
return encode(
switch case c>0 
return c 
default return (unsigned char)0
,"csv")

with Rasql in WCPS 1.0

select csv(
case when ((c)>(0)) 
then c else (char)(0) end) 
from mr AS c where oid(c)=1025

76-switch_log.test

for c in (mr) 
return encode(
switch case c>0 
return log(c) 
default return (char)0 
,"csv")

with Rasql in WCPS 1.0

select csv(case when ((c)>(0)) 
then log(c) 
else (octet)(0) end) 
from mr AS c where oid(c)=1025

Change History (1)

comment:1 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: newclosed

All the queries are processed in the patch of ticket 1188, close ticket.

Note: See TracTickets for help on using tickets.