Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#1230 closed defect (invalid)

Rasql_Error when scale axis to a slicing point

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: minor Milestone: 10.0
Component: petascope Version: development
Keywords: WCPS 2.0, error in scale, scale slicing point Cc: Dimitar Misev, Alex Dumitru, Vlad Merticariu
Complexity: Medium

Description (last modified by Dimitar Misev)

scaling to an interval that contains any slices should throw an error in rasql.

Examples:

SELECT encode(SCALE(c, [100,243]), "csv" ) FROM rgb AS c

and

SELECT encode(SCALE(c, [100:102,243]), "csv" ) FROM rgb AS c

and

SELECT encode(SCALE(c, [100,100:243]), "csv" ) FROM rgb AS c

In all of these cases rasql should throw an exception: "Invalid scaling minterval".

Scaling in rasdaman is handled in source:qlparser/qtbinaryfunc.cc (QtScale class).

Change History (8)

comment:1 by Dimitar Misev, 9 years ago

Please check if scaling to a point is valid in the WCPS standard, perhaps an interval is mandatory.

comment:2 by Bang Pham Huu, 9 years ago

Component: undecidedrasql
Owner: set to Dimitar Misev
Status: newassigned
Summary: WCPS1.5_Error when scale axis to a slicing pointRasql_Error when scale axis to a slicing point

Dimitar, I think in this case, Rasql should throw an exception when scale at a point, instead of error like this.

rasql -q "select csv(scale( c, [100,243] )) from rgb 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...rasdaman error 0: General error received from the server.
aborting transaction...E0209 09:11:56.585736960   12746 tcp_client_posix.c:171]     failed to connect to 'ipv4:10.70.11.237:7002': socket error: connection refused
E0209 09:11:57.586939956   12746 tcp_client_posix.c:171]     failed to connect to 'ipv4:10.70.11.237:7002': socket error: connection refused
E0209 09:11:59.050714220   12746 tcp_client_posix.c:171]     

comment:3 by Dimitar Misev, 9 years ago

Priority: majorminor

comment:4 by Dimitar Misev, 8 years ago

Description: modified (diff)

comment:5 by Dimitar Misev, 8 years ago

Component: rasqlpetascope
Owner: changed from Dimitar Misev to Bang Pham Huu

Well scale to "point" in rasql is actually valid. In this case the "point" is a vector of integers, and the respective dimension size is multiplied by the respective values you have in the point.

So for array with sdom [0:399,0:343] scaled with vector [100, 243] you get back an array of size [0:39999,0:83591].. which is really big and that's why the query fails.

See section 9.4 Scaling in the QL guide.

So this case needs to be prevented in WCPS actually.

comment:6 by Bang Pham Huu, 8 years ago

I agree, it is "SCALEAXES" from WCS as you can scale the axis multiple times. However, I don't know how WCPS can prevent it ? as how can it calculate the size of the output coverage before running this query to Rasql ? I think this ticket can be closed.

comment:7 by Bang Pham Huu, 8 years ago

Resolution: invalid
Status: assignedclosed

comment:8 by Dimitar Misev, 8 years ago

If it's a valid WCPS request to specify such a vector then it's fine.

Note: See TracTickets for help on using tickets.