#2687 closed defect (fixed)

FIX - WCPS axisIterator in condenser is not evaluated

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.1
Component: petascope Version: 10.0
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

For example, this WCPS query:

for
    $col0 in (DWD_Temp_Max),
    $col1 in (DWD_Niederschlag)

let
    $cutout_31467 := [
        ansi("2002-01-01":"2002-03-31"),
        E(3462790:3465362),
        N(5784639:5787183)
    ],

    $col0_cutout := $col0[$cutout_31467],
    $col1_cutout := $col1[$cutout_31467],
    $col1_cutout_to_col0 := scale($col1_cutout, {
        E:"CRS:1"(imageCrsDomain($col0[E(3462790:3465361)], E)),
        N:"CRS:1"(imageCrsDomain($col0[N(5784639:5787182)], N)),
        ansi:"CRS:1"(imageCrsDomain($col0[ansi("2002-01-01":"2002-03-31")], ansi))
    }),

    $col_compare_bool := ($col0_cutout > 150 and $col1_cutout_to_col0 < 10),
    $start_t := imageCrsDomain($col_compare_bool[ansi("2002-01-01":"2002-01-31")], ansi).lo

return encode (
    coverage everyMonth
   	over $ptmonth aaaa(0:2)
    values
      condense +
      over $t ansi($start_t + ($ptmonth*30):$start_t + ($ptmonth*30) + 30)
      using $col_compare_bool[ansi($t)]
,"json")

returns an error in rasql

Failed internal rasql query: select 14975 +  ( ptmonth[0] * 30 )

because ptmonth[0] is not defined.

Change History (2)

comment:1 by Bang Pham Huu, 22 months ago

It can be reproduced with this simpler query:

for            
    $c in (test_irr_cube_2)

let
  $t := [ansi("2008-01-01T02:01:20.000Z": "2008-01-08T00:02:58.000Z")]
    
return encode ( 
    coverage $c
    over $tt t(0:3)
    values
        condense +
        over $tc t(0 : $tt )
        using avg($c[ansi($tc)])
    , "csv"
)

returns error

Undefined variable: tt

because it tried to run this query to rasql:

select tt[0]
Last edited 22 months ago by Bang Pham Huu (previous) (diff)

comment:2 by Bang Pham Huu, 21 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.