Boaz Ben-Zvi created DRILL-6475: ----------------------------------- Summary: Unnest: Null fieldId Pointer Key: DRILL-6475 URL: https://issues.apache.org/jira/browse/DRILL-6475 Project: Apache Drill Issue Type: Bug Components: Execution - Relational Operators Reporter: Boaz Ben-Zvi Assignee: Parth Chandra Fix For: 1.14.0
Executing the following (in TestE2EUnnestAndLateral.java) causes an NPE as `fieldId` is null in `schemaChanged()`: ``` @Test public void testMultipleBatchesLateral_twoUnnests() throws Exception { String sql = "SELECT t5.l_quantity FROM dfs.`lateraljoin/multipleFiles/` t, LATERAL " + "(SELECT t2.ordrs FROM UNNEST(t.c_orders) t2(ordrs)) t3(ordrs), LATERAL " + "(SELECT t4.l_quantity FROM UNNEST(t3.ordrs) t4(l_quantity)) t5"; test(sql); } ``` And the error is: ``` Error: SYSTEM ERROR: NullPointerException Fragment 0:0 [Error Id: 25f42765-8f68-418e-840a-ffe65788e1e2 on 10.254.130.25:31020] (java.lang.NullPointerException) null org.apache.drill.exec.physical.impl.unnest.UnnestRecordBatch.schemaChanged():381 org.apache.drill.exec.physical.impl.unnest.UnnestRecordBatch.innerNext():199 org.apache.drill.exec.record.AbstractRecordBatch.next():172 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():229 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.physical.impl.join.LateralJoinBatch.prefetchFirstBatchFromBothSides():241 org.apache.drill.exec.physical.impl.join.LateralJoinBatch.buildSchema():264 org.apache.drill.exec.record.AbstractRecordBatch.next():152 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():229 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():63 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():137 org.apache.drill.exec.record.AbstractRecordBatch.next():172 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():229 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():63 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():137 org.apache.drill.exec.record.AbstractRecordBatch.next():172 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():229 org.apache.drill.exec.physical.impl.BaseRootExec.next():103 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():83 org.apache.drill.exec.physical.impl.BaseRootExec.next():93 org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():292 org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():279 java.security.AccessController.doPrivileged():-2 javax.security.auth.Subject.doAs():422 org.apache.hadoop.security.UserGroupInformation.doAs():1657 org.apache.drill.exec.work.fragment.FragmentExecutor.run():279 org.apache.drill.common.SelfCleaningRunnable.run():38 java.util.concurrent.ThreadPoolExecutor.runWorker():1142 java.util.concurrent.ThreadPoolExecutor$Worker.run():617 java.lang.Thread.run():745 (state=,code=0) ``` -- This message was sent by Atlassian JIRA (v7.6.3#76005)