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

Add support for repeated_count multi-level array data type?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.6.0
    • Future
    • Functions - Drill
    • None

    Description

      1. "n1.json" is :

      {"test":[1,2,3,4,4,5]}
      

      Then the function works fine:

      0: jdbc:drill:> select repeated_count(t.test) from `n1.json` as t;
      +------------+
      |   EXPR$0   |
      +------------+
      | 6          |
      +------------+
      

      2. However if the json has 2-level or more arrays:

      {"test":[[1,2,3,4,5,6]]}
      

      The function failed:

      0: jdbc:drill:> select t.test[0][0],t.test[0][1] from `n4.json` as t;
      +------------+------------+
      |   EXPR$0   |   EXPR$1   |
      +------------+------------+
      | 1          | 2          |
      +------------+------------+
      1 row selected (0.126 seconds)
      0: jdbc:drill:> select repeated_count(t.test[0]) from `n4.json` as t;
      Query failed: Screen received stop request sent. Line 54, Column 22: "end" is neither a method, a field, nor a member class of "org.apache.drill.exec.vector.complex.reader.FieldReader" [11c5ff5b-c00f-4754-9bda-c3bec9471f72]
      
      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)
      

      Am I missing something or is this a bug?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              haozhu Hao Zhu
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: