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

Querying a field in a repeated map should return an array

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • Future
    • None
    • None

    Description

      Consider the following json file:

      {"rownum":1, "arrayval": [

      {"val1":"a1"}

      ,

      {"val1":"a2"}

      ]}
      {"rownum":2, "arrayval": [

      {"val1":"b1"}

      ,

      {"val1": "b2"}

      ]}

      If we have the following query, we will fail with a class cast exception.
      select rownum, table.arrayval.val1 from dfs.`input.json` as table;

      We should return an array of type 'val1' like the following

      [a1, a2]
      [b1, b2]

      Attachments

        Activity

          People

            Unassigned Unassigned
            mehant Mehant Baid
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: