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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.1.1
    • 3.1.2, 3.2.0
    • SparkR

    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

        Issue Links

          Activity

            People

              gurwls223 Hyukjin Kwon
              gurwls223 Hyukjin Kwon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: