SQL-MapReduce Collaborative Planning allows the Queen Planner and a SQL-MapReduce function to exchange information when the function implements collaborative planning interface.
SQL-MapReduce Collaborative Planning allows:
- The Queen Planner to be aware of the data stream properties that helps it better optimize queries by removing unnecessary operators following a SQL-MapReduce function call and moving plan operators around to achieve an optimal plan.
- The Queen Planner to provide a SQL-MapReduce function with contextual information about the query calling the function. This allows you to write SQL-MapReduce functions that have better-performing and more optimized code.
SQL-MapReduce Collaborative Planning provides two classes of optimization:
- Reduce data flow going through SQL-MapReduce operator. This is achieved by removing the input columns and rows that are not needed.
- Expressing the output properties of the function: How it produces its output data, what the distribution and order is and passing this information to the Planner.