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

Order By on a flattened column throws SchemaChangeException - Missing function implementation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: SQL Parser, Storage - JSON
    • Labels:
      None

      Description

      Query with an ORDER BY clause on a flattened column fails:

      > select `name`, `type`, flatten(kvgen(`compliments`)) as `compliments` from `user` order by `name`, `type`, `compliments` limit 2;
      Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize incoming schema.  Errors:
      Error in expression at index 2.  Error: Missing function implementation: [hash64asdouble(MAP-REQUIRED, BIGINT-REQUIRED)].  Full expression: null..
      Fragment 3:0
      [Error Id: 3b3d3224-953a-46a2-8caa-fa6949e58ffd on abhi1:31010] (state=,code=0)
      

      Query without order by on the flatten column executes fine.

      > select `name`, `type`, flatten(kvgen(`compliments`)) as `compliments` from `user` order by `name`, `type` limit 2;
      +--------------------+-------+--------------------------------+
      |        name        | type  |          compliments           |
      +--------------------+-------+--------------------------------+
      |  Kurt              | user  | {"key":"cute","value":1.0}     |
      |  Kurt              | user  | {"key":"writer","value":1.0}   |
      +--------------------+-------+--------------------------------+
      2 rows selected (4.239 seconds)
      

        Attachments

        1. drillbit.log.txt
          7 kB
          Abhishek Girish

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              agirish Abhishek Girish
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: