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

Fix lambda variable name issues in nested DataFrame functions in R APIs

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.2, 3.2.0
    • Component/s: SparkR
    • Labels:

      Description

      R's higher order functions also have the same problem with SPARK-34794:

      df <- sql("SELECT array(1, 2, 3) as numbers, array('a', 'b', 'c') as letters")
      collect(select(
        df,
        array_transform("numbers", function(number) {
          array_transform("letters", function(latter) {
            struct(alias(number, "n"), alias(latter, "l"))
          })
        })
      ))
      
        transform(numbers, lambdafunction(transform(letters, lambdafunction(struct(namedlambdavariable() AS n, namedlambdavariable() AS l), namedlambdavariable())), namedlambdavariable()))
      1                                                                                                                                 a, a, b, b, c, c, a, a, b, b, c, c, a, a, b, b, c, c
      

        Attachments

          Activity

            People

            • Assignee:
              hyukjin.kwon Hyukjin Kwon
              Reporter:
              hyukjin.kwon Hyukjin Kwon

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment