Discussion:
[jira] [Created] (DRILL-6891) Drill cannot cast required type to optional and vise versa that may cause failures of functions with more than one argument.
Anton Gozhiy (JIRA)
2018-12-10 16:22:00 UTC
Permalink
Anton Gozhiy created DRILL-6891:
-----------------------------------

Summary: Drill cannot cast required type to optional and vise versa that may cause failures of functions with more than one argument.
Key: DRILL-6891
URL: https://issues.apache.org/jira/browse/DRILL-6891
Project: Apache Drill
Issue Type: Bug
Affects Versions: 1.15.0
Reporter: Anton Gozhiy


*Query:*

{code:sql}
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
{code}

*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)]
{noformat}
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
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Loading...