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

Drill cannot cast required type to optional and vise versa that may cause failures of functions with more than one argument.

    XMLWordPrintableJSON

    Details

      Description

      Query:

      with t (pkey, lnum) as 
        (select l_partkey,
                case when l_linenumber < 3 then null else l_linenumber end 
         from cp.`tpch/lineitem.parquet`)
      select covar_samp(pkey, lnum) from t limit 5
      

      Note: Case statement is needed to transform required data mod to optional.

      Expected result:
      The function should return result.

      Actual result:
      Exception happens: Missing function implementation: [covar_samp(INT-REQUIRED, INT-OPTIONAL)]

      SYSTEM ERROR: Drill Remote Exception
      
      
      Please, refer to logs for more information.
      
      
        (org.apache.drill.exec.exception.SchemaChangeException) Failure while materializing expression. 
      Error in expression at index -1.  Error: Missing function implementation: [covar_samp(INT-REQUIRED, INT-OPTIONAL)].  Full expression: --UNKNOWN EXPRESSION--.
          org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.createAggregatorInternal():513
          org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.createAggregator():434
          org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.buildSchema():181
          org.apache.drill.exec.record.AbstractRecordBatch.next():161
          org.apache.drill.exec.record.AbstractRecordBatch.next():126
          org.apache.drill.exec.record.AbstractRecordBatch.next():116
          org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():63
          org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.innerNext():101
          org.apache.drill.exec.record.AbstractRecordBatch.next():186
          org.apache.drill.exec.record.AbstractRecordBatch.next():126
          org.apache.drill.exec.record.AbstractRecordBatch.next():116
          org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():63
          org.apache.drill.exec.record.AbstractRecordBatch.next():186
          org.apache.drill.exec.record.AbstractRecordBatch.next():126
          org.apache.drill.exec.record.AbstractRecordBatch.next():116
          org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():63
          org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():143
          org.apache.drill.exec.record.AbstractRecordBatch.next():186
          org.apache.drill.exec.physical.impl.BaseRootExec.next():104
          org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():83
          org.apache.drill.exec.physical.impl.BaseRootExec.next():94
          org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():297
          org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():284
          .......():0
          org.apache.hadoop.security.UserGroupInformation.doAs():1669
          org.apache.drill.exec.work.fragment.FragmentExecutor.run():284
          org.apache.drill.common.SelfCleaningRunnable.run():38
          .......():0
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              angozhiy Anton Gozhiy
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: