Opened 3 years ago

Last modified 7 months ago

#794 assigned defect

complex constructor doesn't work with rasj

Reported by: dmisev Owned by: dmisev
Priority: minor Milestone: 10.0
Component: java Version: development
Keywords: Cc:
Complexity: Medium

Description (last modified by bphamhuu)

SELECT complex(42, 73)
rasj[0] RasRNPImplementation.getResponse: type not supported: typeName: 
 typeID:  0
java.sql.SQLException: rasj.RasTypeNotSupportedException: Exception: Base type typeName: 
 typeID:  0
  as RasCollectionType is not supported yet. rasj.RasTypeNotSupportedException: Exception: Base type typeName: 
 typeID:  0
  as RasCollectionType is not supported yet.


Another information

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 (5)

comment:1 Changed 3 years ago by dmisev

  • Owner changed from vliaukevich to bthapaliya
  • Status changed from new to assigned

comment:2 Changed 22 months ago by dmisev

  • Owner changed from bthapaliya to gmerticariu

comment:3 Changed 21 months ago by gmerticariu

Complex type is not implemented in rasj. I will wait for Vlad Zamfir to implement the new complex types and then we can decide who will implement them in rasj.

comment:4 Changed 19 months ago by bphamhuu

  • Description modified (diff)
  • Milestone changed from 9.0.x to 10.0

Merge with #1261 and add information with Petascope error when execute Rasql with complex number.

comment:5 Changed 7 months ago by dmisev

  • Owner changed from gmerticariu to dmisev
Note: See TracTickets for help on using tickets.