HyukjinKwon commented on a change in pull request #23882: [SPARK-26979][PYTHON]
Add missing string column name support for some SQL functions
URL: https://github.com/apache/spark/pull/23882#discussion_r266272011
##########
File path: python/pyspark/sql/functions.py
##########
@@ -85,13 +96,16 @@ def _():
>>> df.select(lit(5).alias('height')).withColumn('spark_user',
lit(True)).take(1)
[Row(height=5, spark_user=True)]
"""
-_functions = {
+_name_functions = {
+ # name functions take a column name as their argument
'lit': _lit_doc,
Review comment:
`lit` doesn't take a column name as their argument. Why did we use such
`name function` category for `lit`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]