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

Pass objects as parameters to SparkSQL UDFs

    XMLWordPrintableJSON

Details

    Description

      You can pass class objects directly to UDFs using the UDF format:

      df.select("*").filter(myFunc(classObj)(col("colName")))

      but the format:

      """SELECT * FROM view WHERE myFunc(classObj, "colName")"""

      or

      """SELECT * FROM view WHERE myFunc(classObj)("colName")"""

      does not work. This would be a very useful feature to have, especially being that UDTs are being made public again in 3.2.0

      Attachments

        Activity

          People

            Unassigned Unassigned
            jshalaby Julian Shalaby
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: