fix lp 1392099 (cqd hive_max_varchar_length) There are two contribuing factors. 1. A fully specified partition requirement (partition of 1) in FileScan::synthHiveScanPhysicalProperty() is not recognized and a modification of the ESPs renders the partition requirement not satisfiable. 2. The reduction in CQD value for hive_max_varchar_length reduces the dop from 5 to 1. In Exchange::createContextForChild(), a dop of 1 renders the parallel version of plan infeasible (see line near 2004 on test "rppForMe->getCountOfPipelines() > 1"). The fix is to address issue #1.
Added a safety check for ApproximatelyNPartitions and improvement for hive sampling logic.