Opened 8 years ago

Closed 8 years ago

#1228 closed defect (fixed)

WCPS1.5_Error when using abs operator with multiple scalar operands

Reported by: Bang Pham Huu Owned by:
Priority: major Milestone: 10.0
Component: rasql Version: development
Keywords: WCPS 2.0, error with multiple operands, error, numbers Cc: Dimitar Misev, Alex Dumitru, Vlad Merticariu
Complexity: Medium

Description

WCPS query [1]

for c in ( mean_summer_airtemp ) return encode(
 (abs(c -  c + 500 + 500)) [ Lat(-44:-8), Long(119:156) ], "csv")

returns an error in WCPS1.5

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0.0" xsd:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="RuntimeError">
<ows:ExceptionText>Runtime error while processing request</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="RuntimeError">
<ows:ExceptionText>java.lang.NullPointerException : null</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

with only one scalar operand

for c in ( mean_summer_airtemp ) return encode(

(abs(c - c + 500 )) [ Lat(-44:-8), Long(119:156) ], "csv")

it can returns the result in CSV

while this is Rasql from WCPS 1.0 with multiple operands from [1]

select csv(
abs(((((c)-(c)))+((500)+(500))))[140:880,-20:700]) 
from mean_summer_airtemp AS c where oid(c)=46593

Change History (2)

comment:1 by Bang Pham Huu, 8 years ago

this error can be happened also with slice function

for m in ( mr ) return encode( slice( m, {i(20), j(20)} )  + 50 - 68, "csv" )

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.