Skip to content

Commit 544fe76

Browse files
rxinconviva-zz
authored andcommitted
[SPARK-2747] git diff --dirstat can miss sql changes and not run Hive tests
dev/run-tests use "git diff --dirstat master" to check whether sql is changed. However, --dirstat won't show sql if sql's change is negligible (e.g. 1k loc change in core, and only 1 loc change in hive). We should use "git diff --name-only master" instead. Author: Reynold Xin <[email protected]> Closes apache#1656 from rxin/hiveTest and squashes the following commits: f5eab9f [Reynold Xin] [SPARK-2747] git diff --dirstat can miss sql changes and not run Hive tests.
1 parent f25170f commit 544fe76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dev/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ JAVA_VERSION=$($java_cmd -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*
3737
# Partial solution for SPARK-1455. Only run Hive tests if there are sql changes.
3838
if [ -n "$AMPLAB_JENKINS" ]; then
3939
git fetch origin master:master
40-
diffs=`git diff --dirstat master | awk '{ print $2; }' | grep "^sql/"`
40+
diffs=`git diff --name-only master | grep "^sql/"`
4141
if [ -n "$diffs" ]; then
4242
echo "Detected changes in SQL. Will run Hive test suite."
4343
export _RUN_SQL_TESTS=true # exported for PySpark tests

0 commit comments

Comments
 (0)