HyukjinKwon commented on a change in pull request #24752:
[SPARK-27893][SQL][PYTHON] Create an integrated test base for Python, Scalar
Pandas, Scala UDF by sql files
URL: https://github.com/apache/spark/pull/24752#discussion_r289273694
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
##########
@@ -126,19 +149,47 @@ class SQLQueryTestSuite extends QueryTest with
SharedSQLContext {
sql + "\n" +
s"-- !query $queryIndex schema\n" +
schema + "\n" +
- s"-- !query $queryIndex output\n" +
+ s"-- !query $queryIndex output\n" +
output
}
}
+ /** A test case. */
+ sealed trait TestCase {
+ val name: String
+ val inputFile: String
+ val resultFile: String
+ }
+
+ /** A regular test case. */
+ private case class RegularTestCase(
+ name: String, inputFile: String, resultFile: String) extends TestCase
+
+ /** A UDF test case. */
+ private case class UDFTestCase(
+ name: String, inputFile: String, resultFile: String, udf: TestUDF)
extends TestCase
+
private def createScalaTestCase(testCase: TestCase): Unit = {
if (blackList.exists(t =>
testCase.name.toLowerCase(Locale.ROOT).contains(t.toLowerCase(Locale.ROOT)))) {
// Create a test case to ignore this case.
ignore(testCase.name) { /* Do nothing */ }
- } else {
- // Create a test case to run this case.
- test(testCase.name) { runTest(testCase) }
+ } else testCase match {
+ case UDFTestCase(_, _, _, udf: TestPythonUDF) if !shouldTestPythonUDFs =>
+ ignore(s"${testCase.name} is skipped because " +
Review comment:
The problem is that it might break other CI running, for instance in other
venders and it will force them to set `IGNORE_SKIPPED_TESTS`. Currently,
PySpark tests are being skipped in the cases (which is common in Python
projects as far as I know)
If we should add a configuration like `IGNORE_SKIPPED_TESTS`, I would like
to do that separately for PySpark side as well. But I and some committers and
people as far as I know tend to ignore them for now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]