Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/20390#discussion_r163755876
--- Diff: python/pyspark/sql/tests.py ---
@@ -2855,6 +2855,10 @@ def test_create_dataframe_from_old_pandas(self):
with self.assertRaisesRegexp(ImportError, 'Pandas >= .* must
be installed'):
self.spark.createDataFrame(pdf)
+ def test_colRegex(self):
+ df = self.spark.createDataFrame([("a", 1), ("b", 2), ("c", 3)])
+ self.assertEqual(df.select(df.colRegex("`(_1)?+.+`")).collect(),
df.select("_2").collect())
--- End diff --
I think this is actually being tested in doctest. Seems we can remove out.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]