Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6588

System table columns incorrectly marked as non-nullable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.13.0
    • Fix Version/s: 1.14.0
    • Component/s: Metadata
    • Labels:

      Description

      System table columns can contain null values but they are incorrectly marked as non-nullable as shown in example table below:  

      0: jdbc:drill:drillbit=10.10.10.191> describe sys.boot;
      +-------------------+--------------------+--------------+
      |    COLUMN_NAME    |     DATA_TYPE      | IS_NULLABLE  |
      +-------------------+--------------------+--------------+
      | name              | CHARACTER VARYING  | NO           |
      | kind              | CHARACTER VARYING  | NO           |
      | accessibleScopes  | CHARACTER VARYING  | NO           |
      | optionScope       | CHARACTER VARYING  | NO           |
      | status            | CHARACTER VARYING  | NO           |
      | num_val           | BIGINT             | NO           |
      | string_val        | CHARACTER VARYING  | NO           |
      | bool_val          | BOOLEAN            | NO           |
      | float_val         | DOUBLE             | NO           |
      +-------------------+--------------------+--------------+

       

      Note that several columns are nulls: 

      +---------------------------------------------------+----------+------------------+-------------+--------+---------+------------+----------+-----------+
      |                       name                        |   kind   | accessibleScopes | optionScope | status | num_val | string_val | bool_val | float_val |
      +---------------------------------------------------+----------+------------------+-------------+--------+---------+------------+----------+-----------+
      drill.exec.options.exec.udf.enable_dynamic_support | BOOLEAN | BOOT | BOOT | BOOT | null | null | true | null |

       

      Because of the not-null metadata, the predicates on these tables such as `WHERE <column> IS NULL` evaluate to FALSE which is incorrect. 

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kkhatua Kunal Khatua
                Reporter:
                amansinha100 Aman Sinha
                Reviewer:
                Arina Ielchiieva
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: