zhengruifeng commented on code in PR #48074:
URL: https://github.com/apache/spark/pull/48074#discussion_r1754186287


##########
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:
   dumb question: in case a input is `str`, e.g.
   
   ```
   square_num(`a`, 3)
   ```
   
   should we treat `a` as a literal string or a column name (like most 
functions) ?
   



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