drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hanifi Gunes (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2256) Flatten on an empty list fails.
Date Tue, 17 Feb 2015 19:02:12 GMT
Hanifi Gunes created DRILL-2256:
-----------------------------------

             Summary: Flatten on an empty list fails.
                 Key: DRILL-2256
                 URL: https://issues.apache.org/jira/browse/DRILL-2256
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Hanifi Gunes


Running

{code}
select flatten(empty) from data.json
{code}

on

{code:title=data.json}
{"empty": [ [] ] }
{code}

fails with

{code}
java.lang.NullPointerException
	at org.apache.drill.exec.vector.complex.RepeatedListVector$RepeatedListTransferPair.<init>(RepeatedListVector.java:273)
~[classes/:na]
	at org.apache.drill.exec.vector.complex.RepeatedListVector$RepeatedListTransferPair.<init>(RepeatedListVector.java:265)
~[classes/:na]
	at org.apache.drill.exec.vector.complex.RepeatedListVector.makeTransferPair(RepeatedListVector.java:322)
~[classes/:na]
	at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:406)
~[classes/:na]
	at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:78)
~[classes/:na]
	at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[classes/:na]
	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99) ~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89) ~[classes/:na]
	at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[classes/:na]
	at org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch.innerNext(FlattenRecordBatch.java:122)
~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[classes/:na]
	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99) ~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89) ~[classes/:na]
	at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[classes/:na]
	at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
~[classes/:na]
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[classes/:na]
	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[classes/:na]
	at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67) ~[classes/:na]
	at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97)
~[classes/:na]
	at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57) ~[classes/:na]
	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:116) ~[classes/:na]
	at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303) [classes/:na]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
{code}

I believe, flatten should have output as many nulls as the number of existing records/rows.



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

Mime
View raw message