Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
I'm using poor a poor man's method for sampling. In the following table, I write a non-null value to COLB with a probability of 0.001.
create table test (mykey integer not null primary key, A.COLA integer, B.COLB integer) IMMUTABLE_ROWS=true, STORE_NULL=false, IMMUTABLE_STORAGE_SCHEME = ONE_CELL_PER_COLUMN, DISABLE_WAL=true
Then:
0: jdbc:phoenix:localhost> select count(*) from test; +-----------+ | COUNT(1) | +-----------+ | 10000000 | +-----------+ 1 row selected (8.95 seconds) 0: jdbc:phoenix:localhost> select count(*) from test where B.COLB is not null; +-----------+ | COUNT(1) | +-----------+ | 10054 | +-----------+ 1 row selected (0.023 seconds) 0: jdbc:phoenix:localhost> select count(*) from test where B.COLB is null; +-----------+ | COUNT(1) | +-----------+ | 0 | +-----------+ 1 row selected (0.022 seconds)
Last statement should have returned 10000000-10054 = 9989946 rows.