Opened 7 years ago
Closed 7 years ago
#1703 closed defect (invalid)
count_cells produces unexpected results on subsets with null values
Reported by: | Vlad Merticariu | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | rasserver | Version: | development |
Keywords: | Cc: | Peter Baumann, Dimitar Misev | |
Complexity: | Medium |
Description
When a dataset has null values, in a count_cells expression containing a comparison, both the mdd expression and the value it is compared against appear to be considered nulls.
I am not sure if this is the expected behavior.
Behavior / steps to reproduce:
create a collection:
./rasql —user rasadmin —passwd rasadmin -q 'create collection testNullCounts GreySet1'
assign it null values (everything above 200):
./rasql —user rasadmin —passwd rasadmin 'update testNullCounts set testNullCounts assign null values [200:*]'
insert some valid data:
./rasql —user rasadmin —passwd rasadmin -q 'insert into testNullCounts values marray x in [0:100] values 1c'
update one of the values to a null:
./rasql —user rasadmin —passwd rasadmin -q 'update testNullCounts set testNullCounts[10:10] ASSIGN marray x in [10:10] values 201c'
test the count with treshhold not null:
./rasql -q 'select count_cells(c < 10) from testNullCounts c' —out string
./rasql: rasdaman query tool v1.0, rasdaman 9.5.0.
opening database RASBASE at localhost:7001...ok
Executing retrieval query…ok
Query result collection has 1 element(s):
Result element 1: 100
./rasql done.
test the count with a treshhold that happens to be a null value in the mdd:
./rasql -q 'select count_cells(c < 201) from testNullCounts c' —out string
./rasql: rasdaman query tool v1.0, rasdaman 9.5.0.
opening database RASBASE at localhost:7001...ok
Executing retrieval query…ok
Query result collection has 1 element(s):
Result element 1: 0
./rasql done.
My initial impression is that 201 should not be considered null, as it is just a scalar, not part of the mdd. The last count result should still be 100.
Closing as we couldn't reproduce this problem.