Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3865

IS NULL does not return correct results when first column family not filtered against

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.11.0
    • 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.

      Attachments

        1. PHOENIX-3865.patch
          127 kB
          James R. Taylor
        2. PHOENIX-3865-wip.patch
          13 kB
          James R. Taylor

        Activity

          People

            jamestaylor James R. Taylor
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: