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

Drill incorrectly return null value when evaluates an expression of repeated list.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.6.0
    • None
    • None

    Description

      This is a follow-up issue after DRILL-1258. After the compiler error is fixed, the query completes with null value in the repeated list.

      JSON data:

      { "a" : [

      { "x": [[1], [2, 20], [3, 30, 300]], "y": "abc"}

      ] }
      { "a" : [

      { "x": [[1000]], "y": "abc2"}

      ] }

      Q1:
      select t.a[0].x from dfs.`/Users/jni/work/data/json/input.json` t;

      EXPR$0
      []
      []
      Total rows returned : 2

      However, if we put the expression into a convert_to function, the query will return correct result:

      Q2 :
      select convert_to(t.a[0].x,'JSON') from dfs.`/Users/jni/work/data/json/input.json` t;

      EXPR$0
      [ [ 1 ], [ 2, 20 ], [ 3, 30, 300 ] ]
      [ [ 1000 ] ]
      Total rows returned : 2

      Seems there might be some bug in copy operation in repeated list vector.

      Attachments

        Activity

          People

            DrillCommitter DrillCommitter
            jni Jinfeng Ni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: