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

CONVERT_FROM_JSON on an empty file throws runtime exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: None
    • Labels:
      None

      Description

      Sample query to reproduce-

      SELECT CONVERT_FROM(columns[1], 'JSON') as col1 FROM dfs.`file1.tbl`;
      

      Throws runtime exception-

      Error: Unexpected RuntimeException: java.lang.UnsupportedOperationException: Unable to find sql accessor for minor type [NULL] and mode [OPTIONAL] (state=,code=0)
      

      The expected result is that the query returns 0 rows.

      Issue observed with commit id - 7a900b71fd269aceee7301afb18fd8d303df5bcd

      Expected result-

      +-------+
      | col1  |
      +-------+
      +-------+
      

      Works with drill 1.11.0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vitalii Vitalii Diravka
                Reporter:
                prasadns14 Prasad Nagaraj Subramanya
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: