zero323 commented on a change in pull request #35032:
URL: https://github.com/apache/spark/pull/35032#discussion_r776509814



##########
File path: python/pyspark/sql/tests/test_functions.py
##########
@@ -286,6 +289,42 @@ def test_dayofweek(self):
         row = df.select(dayofweek(df.date)).first()
         self.assertEqual(row[0], 2)
 
+    # Test added for SPARK-37738; change Python API to accept both col & int 
as input
+    def test_date_add_function(self):
+        dt = datetime.date(2021, 12, 27)
+        df = self.spark.createDataFrame([Row(date=dt, add=2)])

Review comment:
       How about we add schema here
   
   ```python
   df = self.spark.createDataFrame([Row(date=dt, add=2)], "date date, add 
integer")
   ```




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