Opened 11 years ago
Closed 11 years ago
#686 closed defect (fixed)
CellDomain is using lexicographical comparison of int indexes
Reported by: | Piero Campalani | Owned by: | Piero Campalani |
---|---|---|---|
Priority: | critical | Milestone: | 9.0.x |
Component: | petascope | Version: | development |
Keywords: | celldomain order min max | Cc: | Dimitar Misev, Vlad Merticariu, Alex Dumitru |
Complexity: | Easy |
Description
WCPS CellDomain constructor takes min/max bounds as Strings and compare min<max order by means of the String's compareTo method, which is based on Unicode chars.
Numerical comparison must be used instead.
This is a sever bug, which can inhibit queries like:
for c in ( eobstest ) return encode( c[ Long:"CRS:1"(26:138) ], "csv") ==> Invalid cell domain element: lower bound 26 cannot be larger than upper bound 138
(Adding Alex/Vlad in Cc to confirm this is not the case in WCPS 2.0 implementation).
Change History (3)
comment:1 by , 11 years ago
Status: | new → accepted |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
Strings in CellDomainElements were rightly introduced to fix #335, hence allowing more flexible subsets to slip through RasQL: algebric operations and iterator variables.
Since RasQL would throw a proper exception when the lower bound of the subset is greater than the upper bound, we can safely remove this duplicate guard from Java.