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

Use getParameterCount function instead of getParameterTypes.length

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.3
    • 3.5.0
    • ML, Spark Core, SQL
    • None

    Description

      Since jdk1.8 there is an additional function in reflection API getParameterCount, it is better to use that function instead of getParameterTypes.length because getParameterTypes function makes a copy of the parameter types array every invocation.

      This will help to avoid redundant arrays creation.

      Attachments

        Activity

          People

            narekdw Narek Karapetian
            narekdw Narek Karapetian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: