Opened 6 years ago

Last modified 6 years ago

#2093 closed defect

Petascope - WCPS: General Condenser's Where clause should support more boolean expressions — at Version 2

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

Description (last modified by Bang Pham Huu)

Currently, WCPS general condenser's Where clause does not support this case, even though it is a boolean expression

for $c in (TS_X_Spain) return encode(
  condense + over $t time(imageCrsDomain($c[ansi("2015-03-01T00:00:00.000Z":*)], ansi))
  where ( (($t) < imageCrsDomain($c[ansi("2016-06-05T00:00:00.000Z":"2016-12-31T00:00:00.000Z")], ansi)).lo) or (($t) > imageCrsDomain($c[ansi("2016-06-05T00:00:00.000Z":"2016-12-31T00:00:00.000Z")], ansi)).hi) )
  using avg($c[ansi($t), E(428000:430000), N(4575000:4577000)])
  / 10,
"jpeg")

Or simpler case

for $c in (TS_X_Spain) return encode(
  condense + over $t time(imageCrsDomain($c[ansi("2015-03-01T00:00:00.000Z":*)], ansi))
  where ($t > 68)
  using avg($c[ansi($t), E(428000:430000), N(4575000:4577000)])
  / 10,
"jpeg")

The error is

A parsing error occurred at line '3', column '9'. 
Offending token is '$t'. Reason: no viable alternative at input
 'condense + over $t time(imageCrsDomain($c[ansi("2015-03-01T00:00:00.000Z":*)], ansi)) where ($t'.

Change History (2)

comment:1 by Dimitar Misev, 6 years ago

This ticket cannot be generally done before #1293

comment:2 by Bang Pham Huu, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.