Steven Phillips created DRILL-4562: -------------------------------------- Summary: 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)