Opened 11 years ago
Closed 10 years ago
#603 closed defect (duplicate)
Subsets are not transformed to indexes when arithmetic expression is used
Reported by: | Piero Campalani | Owned by: | Vlad Merticariu |
---|---|---|---|
Priority: | critical | Milestone: | 9.0.x |
Component: | petascope | Version: | development |
Keywords: | subset arithmetic expression | Cc: | mantovani@…, Vlad Merticariu, Alex Dumitru |
Complexity: | Medium |
Description
Petascope does not translate subsets to grid indexes when an airthmetic expression is put:
for c in (eobstest) return encode ( c[Lat( 0 ), Long(50), t("1950-01-01")] , "csv") # RasQL: c[0,50,151] -> OK
for c in (eobstest) return encode ( c[Lat( 0 + 100 - 100 ), Long(50), t("1950-01-01")] , "csv") # RasQL: c[0,50,0+100-100] = c[0,50,0] -> WRONG
Change History (8)
comment:1 by , 11 years ago
Cc: | added |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Alan,
the issue addressed in #596 is actually different: parser errors when putting arithm. expressions in an IntervalExpr
Vs wrong (missing) conversion to grid coordinates when arithm. expressions are put into a dimensionIntervalExpr
.
All this stuff is expected in theWCPS standards, if I'm not wrong:
dimensionIntervalElement: axisName [ : crsName ] ( dimensionIntervalExpr ) dimensionIntervalExpr: scalarExpr : scalarExpr | domain ( coverageName , axisName , crsName )
A scalar expression includes arithm. expressions:
numericScalarExpr: | numericScalarExpr addOp numericScalarTerm | numericScalarTerm
comment:4 by , 11 years ago
Priority: | major → critical |
---|
comment:5 by , 11 years ago
Priority: | critical → minor |
---|
Lowering priority: you can always put the single-scalar result of an arithmetic expression in place of the expression itself.
comment:6 by , 10 years ago
Priority: | minor → critical |
---|
What I say in comment:5 does not hold when variables needs to be used in the expression.
comment:7 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:8 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Closing as duplicate of ticket #596, the issue is not different, as suggested in a comment above, but occurs exactly because expressions are not supported in WCPS intervals.
In order to fix this, we need a 2-step evaluation: first evaluate the interval expressions and then use the results in the final rasql query. I am continuing the discussion in #596.
Seems related to #596 if I am not mistaken and is this expected in the WCPS standard? If it is a deviation keyword should be added until we address this so it gets listed in the petascope guide.