You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Aman Sinha (JIRA)" <ji...@apache.org> on 2014/04/17 04:14:18 UTC
[jira] [Updated] (DRILL-536) HashAggregate encounters NPE when no
aggregate functions are present
[ https://issues.apache.org/jira/browse/DRILL-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aman Sinha updated DRILL-536:
-----------------------------
Attachment: 0001-Fix-DRILL-536-Check-for-number-of-aggregate-function.patch
Attached a patch with a fix for this. This also includes a test case.
> HashAggregate encounters NPE when no aggregate functions are present
> --------------------------------------------------------------------
>
> Key: DRILL-536
> URL: https://issues.apache.org/jira/browse/DRILL-536
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Aman Sinha
> Assignee: Aman Sinha
> Attachments: 0001-Fix-DRILL-536-Check-for-number-of-aggregate-function.patch
>
>
> For a plan that contains only group-by keys and no aggregate functions, we encounter a NPE, which is coming during code generation. See below. The physical plan to reproduce is also given below.
> {
> head : {
> version : 1,
> generator : {
> type : "optiq",
> info : "na"
> },
> type : "APACHE_DRILL_PHYSICAL"
> },
> graph : [ {
> "pop" : "parquet-scan",
> "@id" : 1,
> "entries" : [ {
> "path" : "tpch/nation.parquet"
> } ],
> "storage" : {
> "type" : "file",
> "connection" : "classpath:///"
> },
> "format" : {
> "type" : "parquet"
> }
> }, {
> pop : "project",
> @id : 2,
> exprs : [ {
> ref : "output.$f0",
> expr : "N_REGIONKEY"
> }, {
> ref : "output.$f1",
> expr : "N_NATIONKEY"
> }, {
> ref : "output.$f2",
> expr : "N_NAME"
> } ],
> child : 1
> }, {
> pop : "hash-aggregate",
> @id : 3,
> child : 2,
> keys : [ {
> ref : "$f0",
> expr : "$f0"
> }, {
> ref : "$f1",
> expr : "$f1"
> }, {
> ref : "$f2",
> expr : "$f2 "
> } ]
> }, {
> pop : "screen",
> @id : 4,
> child : 3
> } ]
> }
> java.lang.NullPointerException
> org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.createAggregatorInternal(HashAggBatch.java:184) ~[classes/:na]
> org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.createAggregator(HashAggBatch.java:165) ~[classes/:na]
> org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.next(HashAggBatch.java:112) ~[classes/:na]
> org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:107) ~[classes/:na]
> org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:85) ~[classes/:na]
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:83) ~[classes/:na]
--
This message was sent by Atlassian JIRA
(v6.2#6252)