Opened 9 years ago

Closed 9 years ago

#1261 closed defect (duplicate)

Rasj does not support return complex number from WCPS

Reported by: Bang Pham Huu Owned by: Alex Dumitru
Priority: minor Milestone: 10.0
Component: java Version: development
Keywords: Cc: Alex Dumitru, George Merticariu
Complexity: Medium

Description

When WCPS 1.5 translates this WCPS query

for c in (mr) return (2,3)

to Rasql

SELECT complex(2, 3) FROM mr AS c

when Petascope execute this query, it throws exception

Caused by: rasj.RasTypeNotSupportedException: Exception: Base type typeName: 
 typeID:  0
  as RasCollectionType is not supported yet.
	at org.rasdaman.rasnet.communication.RasRasnetImplementation.getResponse(RasRasnetImplementation.java:711)
	at org.rasdaman.rasnet.communication.RasRasnetImplementation.queryRequest(RasRasnetImplementation.java:400)
	at rasj.odmg.RasOQLQuery.execute(RasOQLQuery.java:254)
	at petascope.util.ras.RasUtil.executeRasqlQuery(RasUtil.java:151)

However, this Rasql query can be executed normally in Rasql

rasql -q 'SELECT complex(2, 3) FROM mr AS c' --out string
rasql: rasdaman query tool v1.0, rasdaman v9.2.0-beta1-gf79e291 -- generated on 21.01.2016 14:39:26.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...ok
Query result collection has 1 element(s):
  Result element 1: (2,3)

It works if encode complex number inside "encode( )" operator, here is example:

http://localhost:8088/rasdaman/ows?service=WCS&version=2.0.1&request=ProcessCoverages&query=
for c in (mr) return encode(coverage complexNumber 
over $x x (0:1),$y y (0:1) values 
condense over $x x (0:1),$y y (0:1) 
using (0.1, 0.1),"csv")&wcpsVersion=2.0

which returns Rasql

SELECT encode(
MARRAY x in [0:1,209:210] VALUES 
CONDENSE + 
OVER x in [0:1,209:210] 
USING complex(0.1, 0.1), "csv" ) 
FROM mr AS c

and result

{(0.4, 0.4),(0.4, 0.4)},{(0.4, 0.4),(0.4, 0.4)}

Change History (2)

comment:1 by Dimitar Misev, 9 years ago

This is a duplicate ticket of #794, please merge them.

comment:2 by Bang Pham Huu, 9 years ago

Resolution: duplicate
Status: newclosed

As Dimitar's request, I merged this ticket to #794.

Note: See TracTickets for help on using tickets.