You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/12/28 23:45:13 UTC

[jira] [Updated] (DRILL-975) Null-on-exception option for cast functions

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

Jacques Nadeau updated DRILL-975:
---------------------------------
    Issue Type: Improvement  (was: Bug)

> Null-on-exception option for cast functions
> -------------------------------------------
>
>                 Key: DRILL-975
>                 URL: https://issues.apache.org/jira/browse/DRILL-975
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Functions - Drill
>            Reporter: Steven Phillips
>            Assignee: Jacques Nadeau
>             Fix For: Future
>
>         Attachments: DRILL-975.patch
>
>
> Currently, if a particular value cannot be cast to the target type, an exception is thrown and the query fails. We should have a mode that will treat the output of all cast functions as nullable, and return a null value if the cast fails, rather than throwing an exception.
> An important example where this is important is when using the Text reader. The text reader always produces a single, RepeatedVarChar column. The columns are then cast to the appropriate type. For the columns that are cast to numeric types, if there is no value (i.e. it's an empty string), currently this will throw NumberFormatException. What we really want is for it to produce a Null value.



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