Opened 8 years ago

Closed 8 years ago

#1232 closed defect (fixed)

WCPS1.5_Parsing error when calculate average values

Reported by: Bang Pham Huu Owned by:
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: WCPS 2.0, error in reducing, averages value Cc: Dimitar Misev, Vlad Merticariu, Alex Dumitru
Complexity: Medium

Description

WCPS query

for c in (rgb) return encode(avg((long)(c.red - c.blue)[i(0:0), j(0:0)]) + 50 , "csv")

with WCPS 1.5 returns error

<ows:Exception exceptionCode="RuntimeError">
<ows:ExceptionText>
java.lang.ClassCastException : petascope.wcps2.translator.ReduceExpression 
cannot be cast to petascope.wcps2.translator.CoverageExpression
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

while Rasql from WCPS 1.0 returns

select csv(
((avg_cells((long)((((c).0)-((c).2))[0:0,343:343])))+(50)))
 from rgb AS c where oid(c)=45057

and values {177}

Change History (2)

comment:1 by Bang Pham Huu, 8 years ago

Component: undecidedpetascope

comment:2 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: newclosed

Patch was accepted, close ticket.

Note: See TracTickets for help on using tickets.