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

Implement CollapseAggregate Reference Operator

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • 0.1.0-m1
    • None

    Description

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

      ,...

      ]

      }

      Attachments

        Activity

          People

            tnachen Timothy Chen
            tnachen Timothy Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: