You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/01 13:11:02 UTC
[jira] [Commented] (DRILL-5757) CONVERT_TO_JSON function is failed
while using non-existence field as a parameter.
[ https://issues.apache.org/jira/browse/DRILL-5757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150480#comment-16150480 ]
ASF GitHub Bot commented on DRILL-5757:
---------------------------------------
Github user arina-ielchiieva commented on the issue:
https://github.com/apache/drill/pull/929
LGTM, +1
> CONVERT_TO_JSON function is failed while using non-existence field as a parameter.
> ----------------------------------------------------------------------------------
>
> Key: DRILL-5757
> URL: https://issues.apache.org/jira/browse/DRILL-5757
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Data Types
> Affects Versions: 1.11.0
> Reporter: Vitalii Diravka
> Assignee: Vitalii Diravka
> Labels: ready-to-commit
> Fix For: 1.12.0
>
>
> Using of non-existence field as parameter (or field with null values across a whole batch) of CONVERT_TO_JSON function leads to failure.
> simple.json
> {code}
> {"id": 0}
> {code}
> {code}
> 0: jdbc:drill:zk=local> select `id`, convert_to(`complex_field`, 'JSON') from dfs.`/tmp/simple.json`;
> Error: SYSTEM ERROR: UnsupportedOperationException: Unable to get holder type for minor type [LATE] and mode [OPTIONAL]
> Fragment 0:0
> [Error Id: a13a1ed0-f8fe-4d4a-ba35-ab17c3a2f171 on vitalii-pc:31010] (state=,code=0)
> {code}
> The root cause of the issue and fix:
> If there isn't a particular vector for the field, "NullExpression" is created as an argument for the Drill function. That argument can be replaced later in "ExpressionTreeMaterializer.visitFunctionCall()" with "TypedNullConstant" logical expression, but LATE type shouldn't be used for this case, the data type of the field is still unknown.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)