Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#953 closed defect (fixed)

Update clause should support data coming from the decode operation

Reported by: Alex Dumitru Owned by: Dimitar Misev
Priority: major Milestone: 9.1
Component: undecided Version: development
Keywords: Cc:
Complexity: Medium

Description

The following query fails due to the type check:

UPDATE MyCoverage SET MyCoverage[0:1199,0:1199] ASSIGN shift(decode($1), [0,0]) WHERE oid(MyCoverage) = 513

As decode cannot provide the type of its contents before evaluation, checkType will fail.

Change History (3)

comment:1 by Dimitar Misev, 9 years ago

Are you sure, seems to work fine:

$ rasql -q "update mr2 as a set a[*:*, *:*] assign shift(decode(\$1), [0,0]) where oid(a) = 3585" -f ./manuals_and_examples/examples/images/mr_1.tif
rasql: rasdaman query tool v1.0, rasdaman v9.1.0 -- generated on 10.07.2015 16:50:44.
opening database RASBASE at localhost:7001...ok
fetching type information for GreyString from database, using readonly transaction...ok
reading file ./manuals_and_examples/examples/images/mr_1.tif...ok
  constant 1: GMarray
  Oid...................: 
  Type Structure........: 
  Type Schema...........: marray< char >
  Domain................: [0:33759]
  Base Type Schema......: char
  Base Type Length......: 1
  Data format.......... : Array
  Data size (bytes).... : 33760
Executing update query...ok
rasql done.

comment:2 by Dimitar Misev, 9 years ago

Resolution: fixed
Status: newclosed

comment:3 by Dimitar Misev, 9 years ago

Milestone: 9.1
Note: See TracTickets for help on using tickets.