Abhishek Girish created DRILL-5864: -------------------------------------- Summary: Selecting a non-existing field from a MapR-DB JSON table fails with NPE Key: DRILL-5864 URL: https://issues.apache.org/jira/browse/DRILL-5864 Project: Apache Drill Issue Type: Bug Components: Execution - Relational Operators, Storage - MapRDB Affects Versions: 1.12.0 Reporter: Abhishek Girish Assignee: Hanumath Rao Maduri Attachments: OrderByNPE.log, OrderByNPE2.log
Query 1 {code} > select C_FIRST_NAME,C_BIRTH_COUNTRY,C_BIRTH_YEAR,C_BIRTH_MONTH,C_BIRTH_DAY > from customer ORDER BY C_BIRTH_COUNTRY ASC, C_FIRST_NAME ASC LIMIT 10; Error: SYSTEM ERROR: NullPointerException (java.lang.NullPointerException) null org.apache.drill.exec.record.SchemaUtil.coerceContainer():176 org.apache.drill.exec.physical.impl.xsort.managed.BufferedBatches.convertBatch():124 org.apache.drill.exec.physical.impl.xsort.managed.BufferedBatches.add():90 org.apache.drill.exec.physical.impl.xsort.managed.SortImpl.addBatch():265 org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.loadBatch():421 org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.load():357 org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.innerNext():302 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext():93 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.innerNext():115 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.innerNext():115 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext():93 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():134 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.physical.impl.BaseRootExec.next():105 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():81 org.apache.drill.exec.physical.impl.BaseRootExec.next():95 org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():234 org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():227 java.security.AccessController.doPrivileged():-2 javax.security.auth.Subject.doAs():422 org.apache.hadoop.security.UserGroupInformation.doAs():1595 org.apache.drill.exec.work.fragment.FragmentExecutor.run():227 org.apache.drill.common.SelfCleaningRunnable.run():38 java.util.concurrent.ThreadPoolExecutor.runWorker():1149 java.util.concurrent.ThreadPoolExecutor$Worker.run():624 java.lang.Thread.run():748 (state=,code=0) {code} Plan {code} 00-00 Screen 00-01 Project(C_FIRST_NAME=[$0], C_BIRTH_COUNTRY=[$1], C_BIRTH_YEAR=[$2], C_BIRTH_MONTH=[$3], C_BIRTH_DAY=[$4]) 00-02 SelectionVectorRemover 00-03 Limit(fetch=[10]) 00-04 Limit(fetch=[10]) 00-05 SelectionVectorRemover 00-06 Sort(sort0=[$1], sort1=[$0], dir0=[ASC], dir1=[ASC]) 00-07 Scan(groupscan=[JsonTableGroupScan [ScanSpec=JsonScanSpec [tableName=maprfs:///drill/testdata/tpch/sf1/maprdb/json/range/customer, condition=null], columns=[`C_FIRST_NAME`, `C_BIRTH_COUNTRY`, `C_BIRTH_YEAR`, `C_BIRTH_MONTH`, `C_BIRTH_DAY`]]]) {code} Query 2 {code} > select C_SALUTATION,C_FIRST_NAME,C_LAST_NAME from customer ORDER BY > C_BIRTH_COUNTRY DESC, C_FIRST_NAME DESC LIMIT 10; Error: SYSTEM ERROR: NullPointerException Fragment 0:0 [Error Id: fc02de86-ce9b-418a-80ce-b7f5365911e1 on sidrill1:31010] (java.lang.NullPointerException) null org.apache.drill.exec.record.SchemaUtil.coerceContainer():176 org.apache.drill.exec.physical.impl.xsort.managed.BufferedBatches.convertBatch():124 org.apache.drill.exec.physical.impl.xsort.managed.BufferedBatches.add():90 org.apache.drill.exec.physical.impl.xsort.managed.SortImpl.addBatch():265 org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.loadBatch():421 org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.load():357 org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.innerNext():302 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext():93 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.innerNext():115 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.innerNext():115 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext():93 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.record.AbstractRecordBatch.next():119 org.apache.drill.exec.record.AbstractRecordBatch.next():109 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():134 org.apache.drill.exec.record.AbstractRecordBatch.next():164 org.apache.drill.exec.physical.impl.BaseRootExec.next():105 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():81 org.apache.drill.exec.physical.impl.BaseRootExec.next():95 org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():234 org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():227 java.security.AccessController.doPrivileged():-2 javax.security.auth.Subject.doAs():422 org.apache.hadoop.security.UserGroupInformation.doAs():1595 org.apache.drill.exec.work.fragment.FragmentExecutor.run():227 org.apache.drill.common.SelfCleaningRunnable.run():38 java.util.concurrent.ThreadPoolExecutor.runWorker():1149 java.util.concurrent.ThreadPoolExecutor$Worker.run():624 java.lang.Thread.run():748 (state=,code=0) {code} Plan {code} 00-00 Screen 00-01 Project(C_SALUTATION=[$0], C_FIRST_NAME=[$1], C_LAST_NAME=[$2]) 00-02 SelectionVectorRemover 00-03 Limit(fetch=[10]) 00-04 Limit(fetch=[10]) 00-05 SelectionVectorRemover 00-06 Sort(sort0=[$3], sort1=[$1], dir0=[DESC], dir1=[DESC]) 00-07 Scan(groupscan=[JsonTableGroupScan [ScanSpec=JsonScanSpec [tableName=maprfs:///drill/testdata/tpch/sf1/maprdb/json/range/customer, condition=null], columns=[`C_SALUTATION`, `C_FIRST_NAME`, `C_LAST_NAME`, `C_BIRTH_COUNTRY`]]]) {code} Logs attached. -- This message was sent by Atlassian JIRA (v6.4.14#64029)