hive
hive copied to clipboard
SHARK-172 - Make ppd2 unit test pass
During Operator.initEvaluators() execution, the number of evaluators that get initialised for ReduceSinkOperators relates directly to the numDistributionKeys field. Prior to this change, the number of elements in the keyCols array and the value of numDistributionKeys were potentially out of sync which would cause one of the ExprNodeColumnEvaluator's to have null fields and therefore throw a NPE during the ppd2 test run.
I've piggy backed this on the decision to copy across ExprNodeDesc's due to the direct link between that array and numDistributionKeys during Operator.initEvaluators() execution.