You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Timothy Chen (JIRA)" <ji...@apache.org> on 2013/02/01 07:43:12 UTC

[jira] [Created] (DRILL-28) Implement CollapseAggregate Reference Operator

Timothy Chen created DRILL-28:
---------------------------------

             Summary: Implement CollapseAggregate Reference Operator
                 Key: DRILL-28
                 URL: https://issues.apache.org/jira/browse/DRILL-28
             Project: Apache Drill
          Issue Type: New Feature
            Reporter: Timothy Chen


CollapseAggregate (1)

The collapse aggregate operator collapses a segment of records into a single record.  In the case that a segment (within) is undefined, the collapse aggregate will collapse all input records into a single output record.  
The only outputs of the collapse aggregate operator are the provided aggregations and the values defined as carryover.  The collapse aggregate operator also can be provided a target field reference with which to select the record used for carryover values.  
In the case that a target reference is undefined, the collapse aggregate operation will be free to choose which record the carryover values are drawn from (typically, this is because all records share the same value).  In the case that a target field reference is provided, will draw the carryover variables from a record where the target field references has a true value. If more than one record has a target field value that is true, the carryover values will be drawn from one of those records.  In the case that no record within the target segment has a target value of true, no record will be emitted from that target segment. In no case will more than one record be emitted per segment.
 { @id†: <opref>, op: “collapsingaggregate”, 

  input†: <input>, 

  within*: <name>,

  target*: <name>,

  carryover: [<name>, … , <name>], 

  aggregations: [

    {ref: <name>, expr: <aggexpr> },...

  ]

}


--
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