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

convert_from on a json map with null value produces an NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.10.0
    • None
    • Functions - Drill
    • None

    Description

      git.commit.id.abbrev=d11aba2

      The below query fails with an NPE. Surprisingly there is information about the error in the logs

      0: jdbc:drill:zk=10.10.100.190:5181> select convert_from('{kpi : null}' ,'json') as kpi from cp.`tpch/lineitem.parquet` limit 1;
      Error: Unexpected RuntimeException: java.lang.NullPointerException (state=,code=0)
      

      Adding one more column to the above query gets rid of the NPE

      select '' as rk, convert_from('{kpi : null}' ,'json') as kpi from cp.`tpch/lineitem.parquet` limit 1;
      +-----+------+
      | rk  | kpi  |
      +-----+------+
      |     | {}   |
      +-----+------+
      1 row selected (1.013 seconds)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: