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

Transforming Hive simple UDF (using JAR) expression may incur CNFE in later evaluation

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

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.5, 3.0.0
    • 2.4.6, 3.0.0
    • SQL
    • None

    Description

      In SPARK-26560, we ensured that Hive UDF using JAR is executed regardless of current thread context classloader.

      Wenchen Fan pointed out another potential issue in post-review of SPARK-26560 - quoting the comment:

      Found a potential problem: here we call HiveSimpleUDF.dateType (which is a lazy val), to force to load the class with the corrected class loader.

      However, if the expression gets transformed later, which copies HiveSimpleUDF, then calling HiveSimpleUDF.dataType will re-trigger the class loading, and at that time there is no guarantee that the corrected classloader is used.

      I think we should materialize the loaded class in HiveSimpleUDF.

      This JIRA issue is to track the effort of verifying the potential issue and fixing the issue.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kabhwan Jungtaek Lim
            kabhwan Jungtaek Lim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment