dynamobi/dynamobi — Issue #664: [FRG-208] null values not getting filtered out
Author: dynamobi-build
Created: 2011-12-30 03:42:02+00:00
State: open
Labels: FRG

[reporter="elin", created="Tue, 19 Sep 2006 15:02:22 -0500 (GMT-05:00)"]
Null values aren't getting filtered out of statements when indices aren't created prior to insertion for statements such as the one below:

select * from blahtable where somecol < 5;

-- repro:

create schema ss;

set schema 'ss';

create table tt(v varchar primary key, i int);

insert into tt values

('a', 1), ('b', 2), ('c', null), ('d', 4), ('e', null), ('f', 6);

select * from tt;

-- produces:

+----+----+

| V | I |

+----+----+

| a | 1 |

| b | 2 |

| c | |

| d | 4 |

| e | |

| f | 6 |

+----+----+

select * from tt where i < 5;

-- produces:

+----+----+

| V | I |

+----+----+

| a | 1 |

| b | 2 |

| c | |

| d | 4 |

| e | |

+----+----+

-- if index is created at this point, we still have the same problem

create index i_index on tt(i);

-- but if it's created prior to insertions like so:

create table twi (v varchar primary key, i int);

create index twi_i on twi(i);

insert into twi values

('a', 1), ('b', 2), ('c', null), ('d', 4), ('e', null), ('f', 6);

--then we get the correct results

select * from twi where i < 5;

+----+----+

| V | I |

+----+----+

| a | 1 |

| b | 2 |

| d | 4 |

+----+----+

(self, remember to fix ref file for company-noidx-test.null when issue is fixed)