How Multiple Inputs are Processed - Aster Execution Engine

Teradata Aster® Developer Guide

Product
Aster Execution Engine
Release Number
7.00.02
Published
July 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
xnl1494366523182.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
ffu1489104705746
lifecycle
previous
Product Category
Software

For functions with partitioned inputs (that is, ON clauses with PARTITION BY attributes phrases), SQL-MapReduce performs these steps:

  1. Form a new cogroup tuple for every distinct p_attribute_set.

    The distinct p_attribute_set is the first attribute of its new cogroup tuple.

  2. For each partitioned input, add a new attribute to the cogroup tuple.

    This new attribute contains all attributes of each tuple in the input whose p_attribute_set match those of the cogroup tuple.

  3. For each dimensional input, add a new attribute to the cogroup tuple.

    This new attribute contains all tuples of the dimensional input.

    Now there is one cogroup tuple for each distinct p_attribute_set, each of which has:
    • One attribute that is p_attribute_set
    • One attribute for each partitioned input, which contains a nested array of all matching tuples of that input
    • One attribute for each dimensional input, which contains an array of all tuples of that input
  4. Invoke the SQL-MapReduce function on each cogroup tuple.

SQL-MapReduce uses comparison semantics for this grouping operation; therefore, NULL values are equivalent. Grouped tuples that have empty groups for certain attributes (that is, inputs with no tuples for a particular group) are included in the grouped output by default.