Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#953 closed defect (fixed)

Update clause should support data coming from the decode operation

Reported by: mdumitru Owned by: dmisev
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 Changed 21 months ago by dmisev

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 Changed 21 months ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 21 months ago by dmisev

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