Opened 9 years ago

Closed 8 years ago

#1219 closed defect (fixed)

WCPS1.5_Handle time interval correctly in coverage expression

Reported by: Bang Pham Huu Owned by:
Priority: major Milestone: 9.3
Component: undecided Version: development
Keywords: wpcs1.5, error in parsing interval expression, Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

WCPS query with interval expression ( 3 + 2)

for c in (eobstest) return encode(max(c[t(3 + 2),Lat(20.5:35.1), Long(10.5:75.3)]), "csv")

will be translated to

SELECT encode( max_cells(c[0 + 60,99:100,1]) , "csv" ) FROM eobstest AS c

and returns {1197}

while another operators like "-", example (5 - 3)

for c in (eobstest) return encode(max(c[t(5 - 3),Lat(20.5:35.1), Long(10.5:75.3)]), "csv")

will returns exception

petascope.wcps2.error.managed.processing.InvalidDateTimeSubsetException :
Invalid subsetting coordinates: 5 - 3:5 - 3 for axis t.

with "/", example (2 / 1) it will returns error

for c in (eobstest) return encode(max(c[t(2 / 1),Lat(20.5:35.1), Long(10.5:75.3)]), "csv")
<ows:ExceptionText>
Error evaluating rasdaman query: 'SELECT encode( max_cells(c[2 / 1,-29:100,81:109]) , "csv" ) FROM eobstest AS c
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="RuntimeError">
<ows:ExceptionText>
org.odmg.QueryException : Execution error 390 in line 1, column 27, near token [: Minterval dimension specifications must be either of type interval or integer.
</ows:ExceptionText>

Change History (3)

comment:1 by Bang Pham Huu, 9 years ago

Summary: WCPS1.5_Inconsistence in parsing interval expressionWCPS1.5_Handle time interval correctly in coverage expression

The problem here is due to incorrect time interval processing which was handled in Interval.isCrsComputable and using "-" to check it is time expression (e.g "1985-01-01"), then in CrsComputer need to handle the time parsing with the case when time expression is in String.

An error also from the uncorrect handle is even when add a expression on Lat axis, it will try to parse to Time in String.

for c in (eobstest) return encode(max(
      c[t("1950-01-01"),Lat(20.5 - 5:35.1), Long(10.5:75.3)])
, "csv")

with exception.

petascope.wcps2.error.managed.processing.InvalidDateTimeSubsetException :
 Invalid subsetting coordinates: 20.5 - 5:35.1 for axis Lat.

comment:2 by Bang Pham Huu, 9 years ago

This also should fix this problem in irregular axis with CrsComputer.java

Test case error

102-scaled_irr_series.test
for c in (irr_cube_2) return encode (
   scale( slice( (c[ansi("2008-01-01T00Z":"2008-01-01T12Z")]).b2, {ansi:"CRS:1"(0)}),
          { N:"CRS:1"(0:1), E:"CRS:1"(0:2) } )
, "csv")

comment:3 by Bang Pham Huu, 8 years ago

Milestone: 10.09.3
Resolution: fixed
Status: newclosed

The error in http://rasdaman.org/ticket/1219#comment:2 is fixed in patch ticket 1188, the other error with numeric expression is not supported (e.g: Lat(20.5 - 3)). As ticket is for handling time, then close ticket.

Note: See TracTickets for help on using tickets.