ueshin commented on code in PR #52637:
URL: https://github.com/apache/spark/pull/52637#discussion_r2441216075


##########
python/pyspark/sql/tests/test_udf.py:
##########
@@ -193,13 +193,14 @@ def check_nondeterministic_udf_in_aggregate(self):
             df.agg(sum(udf_random_col())).collect()
 
     def test_chained_udf(self):
-        self.spark.catalog.registerFunction("double", lambda x: x + x, 
IntegerType())
-        [row] = self.spark.sql("SELECT double(1)").collect()
+        self.spark.catalog.registerFunction("double_int", lambda x: x + x, 
IntegerType())
+        [row] = self.spark.sql("SELECT double_int(1)").collect()
         self.assertEqual(row[0], 2)
-        [row] = self.spark.sql("SELECT double(double(1))").collect()
+        [row] = self.spark.sql("SELECT double_int(double_int(1))").collect()
         self.assertEqual(row[0], 4)
-        [row] = self.spark.sql("SELECT double(double(1) + 1)").collect()
+        [row] = self.spark.sql("SELECT double_int(double_int(1) + 
1)").collect()
         self.assertEqual(row[0], 6)
+        self.spark.sql("DROP TEMPORARY FUNCTION IF EXISTS double_int")

Review Comment:
   nit: surround with try-finally to make sure this function will be dropped?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to