aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/inputs/blacklist.sql
diff options
context:
space:
mode:
authorpetermaxlee <petermaxlee@gmail.com>2016-08-10 17:17:21 +0800
committerWenchen Fan <wenchen@databricks.com>2016-08-10 17:17:21 +0800
commitb9f8a117097bc102e261b68f38a679d16e19f2e2 (patch)
tree885731daded3aa3d50fdcff0cdc5d898aa735a03 /sql/core/src/test/resources/sql-tests/inputs/blacklist.sql
parent0578ff9681edbaab4ae68f67272dc3d4d890d53b (diff)
downloadspark-b9f8a117097bc102e261b68f38a679d16e19f2e2.tar.gz
spark-b9f8a117097bc102e261b68f38a679d16e19f2e2.tar.bz2
spark-b9f8a117097bc102e261b68f38a679d16e19f2e2.zip
[SPARK-16866][SQL] Infrastructure for file-based SQL end-to-end tests
## What changes were proposed in this pull request? This patch introduces SQLQueryTestSuite, a basic framework for end-to-end SQL test cases defined in spark/sql/core/src/test/resources/sql-tests. This is a more standard way to test SQL queries end-to-end in different open source database systems, because it is more manageable to work with files. This is inspired by HiveCompatibilitySuite, but simplified for general Spark SQL tests. Once this is merged, I can work towards porting SQLQuerySuite over, and eventually also move the existing HiveCompatibilitySuite to use this framework. Unlike HiveCompatibilitySuite, SQLQueryTestSuite compares both the output schema and the output data (in string form). When there is a mismatch, the error message looks like the following: ``` [info] - blacklist.sql !!! IGNORED !!! [info] - number-format.sql *** FAILED *** (2 seconds, 405 milliseconds) [info] Expected "...147483648 -214748364[8]", but got "...147483648 -214748364[9]" Result should match for query #1 (SQLQueryTestSuite.scala:171) [info] org.scalatest.exceptions.TestFailedException: [info] at org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:495) [info] at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) [info] at org.scalatest.Assertions$class.assertResult(Assertions.scala:1171) ``` ## How was this patch tested? This is a test infrastructure change. Author: petermaxlee <petermaxlee@gmail.com> Closes #14472 from petermaxlee/SPARK-16866.
Diffstat (limited to 'sql/core/src/test/resources/sql-tests/inputs/blacklist.sql')
-rw-r--r--sql/core/src/test/resources/sql-tests/inputs/blacklist.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/core/src/test/resources/sql-tests/inputs/blacklist.sql b/sql/core/src/test/resources/sql-tests/inputs/blacklist.sql
new file mode 100644
index 0000000000..d69f8147a5
--- /dev/null
+++ b/sql/core/src/test/resources/sql-tests/inputs/blacklist.sql
@@ -0,0 +1,4 @@
+-- This is a query file that has been blacklisted.
+-- It includes a query that should crash Spark.
+-- If the test case is run, the whole suite would fail.
+some random not working query that should crash Spark.