asmello 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_r266321520
##########
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:
To be fair, `lit` is such a unique function semantically that it would
warrant its own category. But since the implementation is exactly the same as
those "name functions", I left it there for practical purposes.
----------------------------------------------------------------
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]