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 2016/03/30 22:13:25 UTC

[jira] [Commented] (DRILL-4562) NPE when evaluating expression on nested union type

    [ https://issues.apache.org/jira/browse/DRILL-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218752#comment-15218752 ] 

ASF GitHub Bot commented on DRILL-4562:
---------------------------------------

GitHub user StevenMPhillips opened a pull request:

    https://github.com/apache/drill/pull/455

    DRILL-4562: Fix bug with nested union expressions

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/StevenMPhillips/drill drill-4562

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/455.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #455
    
----
commit d432e193492e4b81242c6d60b976d0fdef6904aa
Author: Steven Phillips <st...@dremio.com>
Date:   2016-03-30T02:55:29Z

    DRILL-4562: Fix bug with nested union expressions

----


> NPE when evaluating expression on nested union type
> ---------------------------------------------------
>
>                 Key: DRILL-4562
>                 URL: https://issues.apache.org/jira/browse/DRILL-4562
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Steven Phillips
>            Assignee: Steven Phillips
>
> A simple reproduction:
> {code}
> select typeof(t.a.b) c from `f.json` t
> {code}
> where f.json contains:
> {code}
> {a : { b : 1 }}
> {a : { b: "hello" }}
> {a : { b: { c : 2} }}
> {code}
> Fails with following:
> {code}
> (java.lang.NullPointerException) null
>     org.apache.drill.exec.vector.complex.FieldIdUtil.getFieldIdIfMatchesUnion():40
>     org.apache.drill.exec.vector.complex.FieldIdUtil.getFieldIdIfMatches():141
>     org.apache.drill.exec.vector.complex.FieldIdUtil.getFieldId():207
>     org.apache.drill.exec.record.SimpleVectorWrapper.getFieldIdIfMatches():101
>     org.apache.drill.exec.record.VectorContainer.getValueVectorId():269
>     org.apache.drill.exec.physical.impl.ScanBatch.getValueVectorId():325
>     org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.getValueVectorId():182
>     org.apache.drill.exec.expr.ExpressionTreeMaterializer$MaterializeVisitor.visitSchemaPath():628
>     org.apache.drill.exec.expr.ExpressionTreeMaterializer$MaterializeVisitor.visitSchemaPath():217
>     org.apache.drill.common.expression.SchemaPath.accept():152
>     org.apache.drill.exec.expr.ExpressionTreeMaterializer$MaterializeVisitor.visitFunctionCall():274
>     org.apache.drill.exec.expr.ExpressionTreeMaterializer$MaterializeVisitor.visitFunctionCall():217
>     org.apache.drill.common.expression.FunctionCall.accept():60
> {code}



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