[ 
https://issues.apache.org/jira/browse/DRILL-2118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-2118:
--------------------------------
    Description: 
Currently mappify throws a non-user friendly error message when the input map 
consists of heterogenous value types. The proposal is to improve the error 
message to inform user about the usage and root cause of the failure in a 
non-technical dialect.

Running
{code}
select kvgen(t.m) from ex.json t
{code}

over

{code:title=ex.json}
{m:{a:1}}
{m:{b:-1.0}}
{code}

throws 

{code}
Query failed: Query failed: Failure while running fragment., 
org.apache.drill.exec.vector.complex.impl.NullableFloat8WriterImpl cannot be 
cast to org.apache.drill.exec.vector.complex.impl.NullableIntWriterImpl
{code}

We should inform the user with an intelligible reason why the query failed 
instead.

  was:
Currently mappify throws a non-user friendly error message when the input map 
consists of heterogenous value types. The proposal is to improve the error 
message to inform user about the usage and root cause of the failure in a 
non-technical dialect.

Running
{code}
select kvgen(t.m) from ex.json t
{code}

over

{code:title=ex.json}
{m:{a:1}}
{m:{b:-1.0}}
{code}

throws 

{code}
Query failed: Query failed: Failure while running fragment., 
org.apache.drill.exec.vector.complex.impl.NullableFloat8WriterImpl cannot be 
cast to org.apache.drill.exec.vector.complex.impl.NullableIntWriterImpl
{code}

We should inform the user with an intelligible reason why query failed instead.


> Improve error message to inform the user if mappify/kvgen fails due to 
> ClassCastException
> -----------------------------------------------------------------------------------------
>
>                 Key: DRILL-2118
>                 URL: https://issues.apache.org/jira/browse/DRILL-2118
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Hanifi Gunes
>            Assignee: Hanifi Gunes
>            Priority: Minor
>
> Currently mappify throws a non-user friendly error message when the input map 
> consists of heterogenous value types. The proposal is to improve the error 
> message to inform user about the usage and root cause of the failure in a 
> non-technical dialect.
> Running
> {code}
> select kvgen(t.m) from ex.json t
> {code}
> over
> {code:title=ex.json}
> {m:{a:1}}
> {m:{b:-1.0}}
> {code}
> throws 
> {code}
> Query failed: Query failed: Failure while running fragment., 
> org.apache.drill.exec.vector.complex.impl.NullableFloat8WriterImpl cannot be 
> cast to org.apache.drill.exec.vector.complex.impl.NullableIntWriterImpl
> {code}
> We should inform the user with an intelligible reason why the query failed 
> instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to