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

False schema change exception in CTAS with AVG window function

    XMLWordPrintableJSON

Details

    Description

      This bug could be related to DRILL-3293, but since it's a different function and different symptom, I'm filing a new one.

      0: jdbc:drill:schema=dfs> create table wf_t1(a1) as select avg(a1) over(partition by a1) from t1;
      Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: Failure while trying to materialize incoming schema.  Errors:
       
      Error in expression at index -1.  Error: Missing function implementation: [castTINYINT(NULL-OPTIONAL)].  Full expression: --UNKNOWN EXPRESSION--..
      
      Fragment 0:0
      
      [Error Id: 1ca5af3a-0ea7-4b75-b493-74f6404d4894 on atsqa4-133.qa.lab:31010] (state=,code=0)
      

      Query works correctly by itself:

      0: jdbc:drill:schema=dfs> select avg(a1) over(partition by a1) from t1;
      +---------+
      | EXPR$0  |
      +---------+
      | 1       |
      | 2       |
      | 3       |
      | 4       |
      | 5       |
      | 6       |
      | 7       |
      | 9       |
      | 10      |
      | null    |
      +---------+
      10 rows selected (0.181 seconds)
      

      Attachments

        1. t1_parquet
          0.4 kB
          Victoria Markman

        Activity

          People

            jni Jinfeng Ni
            vicky Victoria Markman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: