Steven Phillips created DRILL-220:
-------------------------------------

             Summary: streaming-aggregate returning an extra row
                 Key: DRILL-220
                 URL: https://issues.apache.org/jira/browse/DRILL-220
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: M1
            Reporter: Steven Phillips


Here is a physical plan:

{
  head : {
    type : "APACHE_DRILL_PHYSICAL",
    version : 1,
    generator : {
      type : "optiq",
      info : "na"
    }
  },
  graph : [ {
    pop : "parquet-scan",
    @id : 1,
    entries : [ {
      path : "/tmp/tpc-h/customer"
    } ],
    storageengine : {
      type : "parquet",
      dfsName : "file:///"
    },
    ref : "_MAP",
    fragmentPointer : 0
  }, {
    pop : "project",
    @id : 2,
    exprs : [ {
      ref : "output.NATIONKEY",
      expr : "_MAP.C_NATIONKEY"
    }, {
      ref : "output.CUSTKEY",
      expr : "_MAP.C_CUSTKEY"
    } ],
    child : 1
  }, {
    pop : "sort",
    @id : 3,
    child : 2,
    orderings : [ {
      order : "ASC",
      expr : "NATIONKEY"
    } ],
    reverse : false
  }, {
    pop : "streaming-aggregate",
    @id : 4,
    child : 3,
    keys : [ {
      ref : "NATIONKEY",
      expr : "NATIONKEY"
    } ],
    exprs : [ {
      ref : "CUSTOMERS",
      expr : "count(1) "
    } ]
  }, {
    pop : "screen",
    @id : 5,
    child : 4
  } ]
}

It is returning these results:

-----------------------------------
| NATIONKEY      | CUSTOMERS      |
-----------------------------------
| 4              | 0              |
| 0              | 59916          |
| 1              | 59841          |
| 2              | 59952          |
| 3              | 59849          |
| 4              | 59969          |
| 5              | 60471          |
| 6              | 60316          |
| 7              | 60153          |
| 8              | 60215          |
| 9              | 60236          |
| 10             | 60101          |
| 11             | 60056          |
| 12             | 59757          |
| 13             | 59909          |
| 14             | 59476          |
| 15             | 59834          |
| 16             | 59796          |
| 17             | 59788          |
| 18             | 60065          |
| 19             | 60048          |
| 20             | 59803          |
| 21             | 59997          |
| 22             | 60065          |
| 23             | 60381          |
| 24             | 60006          |
-----------------------------------



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to