[SPARK-1978] In some cases, spark-yarn does not automatically restart the failed container

Author: witgo <witgo@qq.com>

Closes #921 from witgo/allocateExecutors and squashes the following commits:

bc3aa66 [witgo] review commit
8800eba [witgo] Merge branch 'master' of https://github.com/apache/spark into allocateExecutors
32ac7af [witgo] review commit
056b8c7 [witgo] Merge branch 'master' of https://github.com/apache/spark into allocateExecutors
04c6f7e [witgo] Merge branch 'master' into allocateExecutors
aff827c [witgo] review commit
5c376e0 [witgo] Merge branch 'master' of https://github.com/apache/spark into allocateExecutors
1faf4f4 [witgo] Merge branch 'master' into allocateExecutors
3c464bd [witgo] add time limit to allocateExecutors
e00b656 [witgo] In some cases, yarn does not automatically restart the container
HOTFIX: Fix Python tests on Jenkins.

Author: Patrick Wendell <pwendell@gmail.com>

Closes #1036 from pwendell/jenkins-test and squashes the following commits:

9c99856 [Patrick Wendell] Better output during tests
71e7b74 [Patrick Wendell] Removing incorrect python path
74984db [Patrick Wendell] HOTFIX: Allow PySpark tests to run on Jenkins.
(cherry picked from commit fb499be1ac935b6f91046ec8ff23ac1267c82342)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>
HOTFIX: Increase time limit for Bagel test

The test was timing out on some slow EC2 workers.

Author: Ankur Dave <ankurdave@gmail.com>

Closes #1037 from ankurdave/bagel-test-time-limit and squashes the following commits:

67fd487 [Ankur Dave] Increase time limit for Bagel test
(cherry picked from commit 55a0e87ee4655106d5e0ed799b11e77f68a17dbb)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>
[SPARK-2076][SQL] Pushdown the join filter & predication for outer join

As the rule described in https://cwiki.apache.org/confluence/display/Hive/OuterJoinBehavior, we can optimize the SQL Join by pushing down the Join predicate and Where predicate.

Author: Cheng Hao <hao.cheng@intel.com>

Closes #1015 from chenghao-intel/join_predicate_push_down and squashes the following commits:

10feff9 [Cheng Hao] fix bug of changing the join type in PredicatePushDownThroughJoin
44c6700 [Cheng Hao] Add logical to support pushdown the join filter
0bce426 [Cheng Hao] Pushdown the join filter & predicate for outer join

(cherry picked from commit db0c038a66cb228bcb62a5607cd0ed013d0f9f20)
Signed-off-by: Michael Armbrust <michael@databricks.com>
[SQL] Add average overflow test case from #978

By @egraldlo.

Author: egraldlo <egraldlo@gmail.com>
Author: Michael Armbrust <michael@databricks.com>

Closes #1033 from marmbrus/pr/978 and squashes the following commits:

e228c5e [Michael Armbrust] Remove "test".
762aeaf [Michael Armbrust] Remove unneeded rule. More descriptive name for test table.
d414cd7 [egraldlo] fommatting issues
1153f75 [egraldlo] do best to avoid overflowing in function avg().

(cherry picked from commit 1abbde0e89131ad95e793ac1834c392db46b448e)
Signed-off-by: Michael Armbrust <michael@databricks.com>