The application of predicates in a query throws out the rows that do not satisfy the criterion of the predicate. Typically, the application of predicates results in reduction in number of rows. As a result, it is desirable to apply predicates as early in the query processing as possible.
At the start of Collaborative Planning, all the predicates in the surrounding query are applied on the output results produced by the SQL-MapReduce function and are therefore called onOutput predicates.
Collaborative Planning allows a SQL-MapReduce function to push an onOutput predicate to the function or input by classifying it as an byFunction or onInput predicate, respectively.
Predicate Category | Description |
---|---|
onInput | An onOutput predicate can be pushed to the function’s inputs. |
byFunction | An onOutput predicate can be pushed to the function, and then applied by the function itself in its processing. |