Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35643

Ambiguous variable reference in functions.py column()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.2
    • 3.2.0, 3.1.3
    • PySpark
    • None

    Description

      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

      Attachments

        Activity

          People

            kvasist Keerthan Harish Vasist
            kvasist Keerthan Harish Vasist
            hyukjin.kwon hyukjin.kwon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 12h
                12h
                Remaining:
                Remaining Estimate - 12h
                12h
                Logged:
                Time Spent - Not Specified
                Not Specified