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