You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean R. Owen (Jira)" <ji...@apache.org> on 2023/03/18 02:48:00 UTC

[jira] [Resolved] (SPARK-42803) Use getParameterCount function instead of getParameterTypes.length

     [ https://issues.apache.org/jira/browse/SPARK-42803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean R. Owen resolved SPARK-42803.
----------------------------------
    Fix Version/s: 3.5.0
                       (was: 3.3.2)
         Assignee: Narek Karapetian
       Resolution: Fixed

Resolved by https://github.com/apache/spark/pull/40422

> Use getParameterCount function instead of getParameterTypes.length
> ------------------------------------------------------------------
>
>                 Key: SPARK-42803
>                 URL: https://issues.apache.org/jira/browse/SPARK-42803
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML, Spark Core, SQL
>    Affects Versions: 3.3.3
>            Reporter: Narek Karapetian
>            Assignee: Narek Karapetian
>            Priority: Minor
>             Fix For: 3.5.0
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org