Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-536

HashAggregate encounters NPE when no aggregate functions are present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • None
    • None

    Description

      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]

      Attachments

        Activity

          People

            amansinha100 Aman Sinha
            amansinha100 Aman Sinha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: