double precision IS NULL does not work ?
Hello I have those DOUBLE PRECISION fields, sometimes containing null values: sql>select count(1), range_low from omop.measurement group by range_low; +-----------+--------------------------+ | L2 | range_low | +===========+==========================+ | 304875924 | null | | 9448250 | 50 | | 16519843 | 0 | | 13198932 | 10 | | 14364002 | 20 | | 3964808 | 30 | | 2998528 | 3 | | 855829 | 2 | +-----------+--------------------------+ 8 tuples However, I am not able to filter based on is null: sql>select count(1) from omop.measurement where range_low is null; +------+ | L3 | +======+ | 0 | +------+ 1 tuple I am not able to understand if this behavior is normal regarding the documentation: "The types REAL, FLOAT and DOUBLE map to the underlying implementation system. No special attention is given to the value NaN." Thanks
Hello Nicolas, What version of MonetDB are you using? It seems to work for me in Mar2018: Welcome to mclient, the MonetDB/SQL interactive terminal (Mar2018) Database: MonetDB v11.29.1 (Mar2018), 'foo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>create table foo (i real); operation successful sql>insert into foo values (NULL), (1); 2 affected rows sql>select count(1) from foo; +------+ | L3 | +======+ | 2 | +------+ 1 tuple sql>select count(1) from foo where i is null; +------+ | L3 | +======+ | 1 | +------+ 1 tuple sql>create table lala (i int, j real); operation successful sql>insert into lala values (1, NULL), (2, NULL), (3, 1.0), (4, 1.0); 4 affected rows sql>select count(1), j from lala group by j; +------+-----------------+ | L2 | j | +======+=================+ | 2 | null | | 2 | 1 | +------+-----------------+ 2 tuples sql>select count(1) from lala where j is null; +------+ | L3 | +======+ | 2 | +------+ 1 tuple sql> Best regards, Panos. On 04/15/2018 03:21 PM, Nicolas Paris wrote:
Hello
I have those DOUBLE PRECISION fields, sometimes containing null values:
sql>select count(1), range_low from omop.measurement group by range_low; +-----------+--------------------------+ | L2 | range_low | +===========+==========================+ | 304875924 | null | | 9448250 | 50 | | 16519843 | 0 | | 13198932 | 10 | | 14364002 | 20 | | 3964808 | 30 | | 2998528 | 3 | | 855829 | 2 | +-----------+--------------------------+ 8 tuples
However, I am not able to filter based on is null:
sql>select count(1) from omop.measurement where range_low is null; +------+ | L3 | +======+ | 0 | +------+ 1 tuple
I am not able to understand if this behavior is normal regarding the documentation:
"The types REAL, FLOAT and DOUBLE map to the underlying implementation system. No special attention is given to the value NaN."
Thanks
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Nicolas Paris
-
Panagiotis Koutsourakis