You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/06/04 15:03:00 UTC
[jira] [Assigned] (SPARK-35643) Ambiguous variable reference in
functions.py column()
[ https://issues.apache.org/jira/browse/SPARK-35643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-35643:
------------------------------------
Assignee: (was: Apache Spark)
> Ambiguous variable reference in functions.py column()
> -----------------------------------------------------
>
> Key: SPARK-35643
> URL: https://issues.apache.org/jira/browse/SPARK-35643
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 3.1.2
> Reporter: Keerthan Harish Vasist
> Priority: Minor
> Labels: bug, pyspark.sql.functions
> Fix For: 3.2.0, 3.1.3
>
> Original Estimate: 12h
> Remaining Estimate: 12h
>
> In functions.py, there is a function added {{def column(col)}}. There is also another method in the same file {{def col(col)}}. This leads to some ambiguity on whether the parameter is being referred to or the function. In pyspark 3.1.2, this leads to {{TypeError: 'str' object is not callable}} when the function {{column(col)}} is called - the highest preference is given to the string variable in scope as opposed to the function {{col }}in the file as intended.
> This PR fixes that ambiguity by changing the variable name to {{col_like}}.
>
> I have already raised a PR to fix the issue - https://github.com/apache/spark/pull/32771
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org