xinrong-meng commented on code in PR #48074:
URL: https://github.com/apache/spark/pull/48074#discussion_r1756031195


##########
examples/src/main/python/sql/udtf.py:
##########
@@ -39,13 +39,13 @@ def eval(self, start: int, end: int):
             for num in range(start, end + 1):
                 yield (num, num * num)
 
-    from pyspark.sql.functions import lit, udtf
+    from pyspark.sql.functions import udtf
 
     # Create a UDTF using the class definition and the `udtf` function.
     square_num = udtf(SquareNumbers, returnType="num: int, squared: int")
 
     # Invoke the UDTF in PySpark.
-    square_num(lit(1), lit(3)).show()
+    square_num(1, 3).show()

Review Comment:
   +1, the string input might be tricky to decide



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