Skip to content
Prev Previous commit
Next Next commit
rmv duplicate test
  • Loading branch information
xinrong-meng committed Apr 19, 2023
commit 63ef94e6855a9b9cbf7f20282f28cebaf06cd3c6
41 changes: 0 additions & 41 deletions python/pyspark/sql/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,47 +838,6 @@ def setUpClass(cls):
cls.spark.conf.set("spark.sql.execution.pythonUDF.arrow.enabled", "false")


def test_use_arrow(self):
# useArrow=True
row_true = (
self.spark.range(1)
.selectExpr(
"array(1, 2, 3) as array",
)
.select(
udf(lambda x: str(x), useArrow=True)("array"),
)
.first()
)
# The input is a NumPy array when the Arrow optimization is on.
self.assertEquals(row_true[0], "[1 2 3]")

# useArrow=None
row_none = (
self.spark.range(1)
.selectExpr(
"array(1, 2, 3) as array",
)
.select(
udf(lambda x: str(x), useArrow=None)("array"),
)
.first()
)

# useArrow=False
row_false = (
self.spark.range(1)
.selectExpr(
"array(1, 2, 3) as array",
)
.select(
udf(lambda x: str(x), useArrow=False)("array"),
)
.first()
)
self.assertEquals(row_false[0], row_none[0]) # "[1, 2, 3]"


class UDFInitializationTests(unittest.TestCase):
def tearDown(self):
if SparkSession._instantiatedSession is not None:
Expand Down