Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#479 closed defect (wontfix)

Handling of NaN values in rasql

Reported by: dmisev Owned by: dmisev
Priority: major Milestone: 9.0
Component: qlparser Version: development
Keywords: Cc: pbaumann, olcl
Complexity: Medium

Description

rasql should be able to parse and work with NaN values, with queries like

[rasdaman@vostok cci_scripts]$  rasql -q "select
count_cells(r[*:*,*:*,2] != 'nan')  from ESACCI_v0_95_Rrs_412_monthly as
r" --out string
rasql: rasdaman query tool v1.0, rasdaman v8.4 -- generated on
15.08.2013 09:22:22.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 300: Parsing error 300 in
line 1, column 36: Unexpected name '.
aborting transaction...ok
rasql done.
[rasdaman@vostok cci_scripts]$  rasql -q "select
count_cells(r[*:*,*:*,2] != nan)  from ESACCI_v0_95_Rrs_412_monthly as
r" --out string
rasql: rasdaman query tool v1.0, rasdaman v8.4 -- generated on
15.08.2013 09:22:22.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 357: Execution error 357 in
line 1, column 36, near token nan: Variable is unknown.
aborting transaction...ok
rasql done.
[rasdaman@vostok cci_scripts]$  rasql -q "select
count_cells(r[*:*,*:*,2] != NaN)  from ESACCI_v0_95_Rrs_412_monthly as
r" --out string
rasql: rasdaman query tool v1.0, rasdaman v8.4 -- generated on
15.08.2013 09:22:22.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 357: Execution error 357 in
line 1, column 36, near token NaN: Variable is unknown.
aborting transaction...ok
rasql done.
[rasdaman@vostok cci_scripts]$  rasql -q "select
count_cells(r[*:*,*:*,2] != NAN)  from ESACCI_v0_95_Rrs_412_monthly as
r" --out string
rasql: rasdaman query tool v1.0, rasdaman v8.4 -- generated on
15.08.2013 09:22:22.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 357: Execution error 357 in
line 1, column 36, near token NAN: Variable is unknown.
aborting transaction...ok
rasql done.
[rasdaman@vostok cci_scripts]$  rasql -q 'select
count_cells(r[*:*,*:*,2] != "nan")  from ESACCI_v0_95_Rrs_412_monthly as
r' --out string
rasql: rasdaman query tool v1.0, rasdaman v8.4 -- generated on
15.08.2013 09:22:22.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 403: Execution error 403 in
line 1, column 33, near token !=: Binary operation is not supported on
these data types.
aborting transaction...ok
rasql done.
[rasdaman@vostok cci_scripts]$  rasql -q 'select
count_cells(r[*:*,*:*,2] > "nan")  from ESACCI_v0_95_Rrs_412_monthly as
r' --out string
rasql: rasdaman query tool v1.0, rasdaman v8.4 -- generated on
15.08.2013 09:22:22.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 403: Execution error 403 in
line 1, column 33, near token >: Binary operation is not supported on
these data types.
aborting transaction...ok
rasql done.

Change History (4)

comment:1 Changed 3 years ago by dmisev

Patch submitted for both rasql and WCPS.

Last edited 3 years ago by dmisev (previous) (diff)

comment:2 Changed 3 years ago by dmisev

nan is a floating point constant and can be used in any place in rasql where a floating point constant is allowed. Equality and inequality involving nans in rasql are properly handled. Other comparison operators make no sense and return false. Arithmetic operations involving nans always result in nan.

More info at http://en.wikipedia.org/wiki/NaN

comment:3 Changed 3 years ago by dmisev

  • Resolution set to wontfix
  • Status changed from new to closed

comment:4 Changed 3 years ago by pbaumann

possibly provide an input check, eg, in rasgeo? in import format decoder?

Last edited 3 years ago by pbaumann (previous) (diff)
Note: See TracTickets for help on using tickets.