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

kvgen functions fails when the input is an index within a repeated map vector

    XMLWordPrintableJSON

    Details

      Description

      git.commit.id.abbrev=6dca24a

      kvgen function does not work for the below dataset which has an array of maps

      {
         "col1" : [
              {"m1":"val1", "m2":"val2"},
              {"m3":"val3", "m4":"val4"}
          ]
      }
      

      Query :

      0: jdbc:drill:schema=dfs> select kvgen(col1[0]) from `json_kvgenflatten/temp.json`;
      Query failed: Failure while running fragment. kvgen function only supports Simple maps as input [c9bf5998-2198-4b12-a3b8-2a5a7b1e938f]
      
      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)
      

      I attached the explain plan and the logs for the failing query. Let me know if you need anything else.

        Attachments

        1. DRILL-1641.1.patch
          6 kB
          Daniel Barclay
        2. error.log
          12 kB
          Rahul Kumar Challapalli
        3. explain_plan.txt
          8 kB
          Rahul Kumar Challapalli

          Activity

            People

            • Assignee:
              dsbos Daniel Barclay
              Reporter:
              rkins Rahul Kumar Challapalli
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: