Skip to content

Commit c1f982d

Browse files
committed
updated test_spark_json_to_parquet.sh
1 parent 536e023 commit c1f982d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test_spark_json_to_parquet.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ srcdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1919

2020
cd "$srcdir"
2121

22+
# shellcheck disable=SC1091
2223
. ./utils.sh
2324

2425
section "Spark JSON => Parquet"
@@ -29,7 +30,7 @@ if is_inside_docker; then
2930
exit 0
3031
fi
3132

32-
export SPARK_VERSIONS="${@:-1.3.1 1.4.0 1.5.1 1.6.2 2.0.0}"
33+
export SPARK_VERSIONS="${*:-1.3.1 1.4.0 1.5.1 1.6.2 2.0.0}"
3334

3435
for SPARK_VERSION in $SPARK_VERSIONS; do
3536
dir="spark-$SPARK_VERSION-bin-hadoop2.6"
@@ -50,8 +51,11 @@ for SPARK_VERSION in $SPARK_VERSIONS; do
5051
echo
5152
export SPARK_HOME="$dir"
5253
rm -fr "test-$dir.parquet"
53-
../spark_json_to_parquet.py -j data/multirecord.json -p "test-$dir.parquet" &&
54-
echo "SUCCEEDED with Spark $SPARK_VERSION" ||
55-
{ echo "FAILED test with Spark $SPARK_VERSION"; exit 1; }
54+
if ../spark_json_to_parquet.py -j data/multirecord.json -p "test-$dir.parquet"; then
55+
echo "SUCCEEDED with Spark $SPARK_VERSION"
56+
else
57+
echo "FAILED test with Spark $SPARK_VERSION"
58+
exit 1
59+
fi
5660
done
5761
echo "SUCCESS"

0 commit comments

Comments
 (0)