Example - 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
////////////////////////////////////////////////////////////////////////
// The following is an example of predicate push-down to the function,
// where operator is '<' and the predicate column has
// data in ascending order
// (versus a column containing md5sum's).
// This is specified in the completePlanningContract method
//
if (outPred.isSimpleConstraint())
{
   // a simple constraint can only involve a single column
   ColumnDefinition predOutCol = predOutCols.get(0);

   if (outPred.getOperatorType() == OperatorType.LT
         &&
         // isColAscending is a helper function that
         // determines whether the column is produced
         // by the function in ascending order.
         // As all input columns pass through to the
         // output,
         // the function looks at the corresponding
         // OrderDefinition in the Order of the PlanInputInfo
         // to see if it is ascending.
         isColAscending (predOutCol, planContract)
      )
   {
      ByFunctionPredicate funcPred = outPred.pushToFunction();
      byFunctionPredicates.add(funcPred);
      pushedToFunction = true;
   }
}