Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/21007#discussion_r181078856
--- Diff: python/pyspark/sql/tests.py ---
@@ -3062,6 +3071,64 @@ def
test_sparksession_with_stopped_sparkcontext(self):
sc.stop()
+class QueryExecutionListenerTests(unittest.TestCase, SQLTestUtils):
+ # These tests are separate because it uses
'spark.sql.queryExecutionListeners' which is
+ # static and immutable. This can't be set or unset, for example, via
`spark.conf`.
+
+ @classmethod
+ def setUpClass(cls):
+ import glob
+ from pyspark.find_spark_home import _find_spark_home
+
+ SPARK_HOME = _find_spark_home()
+ filename_pattern = (
+ "sql/core/target/scala-*/test-classes/org/apache/spark/sql/"
+ "TestQueryExecutionListener.class")
+ if not glob.glob(os.path.join(SPARK_HOME, filename_pattern)):
+ raise unittest.SkipTest(
--- End diff --
I admit It's rare. But I believe this is more correct. In fact, there are
few test cases actually taking care about this.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]