{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":149577596,"defaultBranch":"master","name":"spark","ownerLogin":"suesunss","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-09-20T08:34:23.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/22719158?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1599824816.0","currentOid":""},"activityList":{"items":[{"before":"6b71f71e196718474a0e204a6b29aec2d2f8530d","after":"11c9838283e98d5ebe6ce13b85e26217494feef2","ref":"refs/heads/master","pushedAt":"2023-03-18T17:12:12.000Z","pushType":"push","commitsCount":235,"pusher":{"login":"suesunss","name":"Shu SHANG","path":"/suesunss","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22719158?s=80&v=4"},"commit":{"message":"[SPARK-42803][CORE][SQL][ML] Use getParameterCount function instead of getParameterTypes.length\n\n### What changes were proposed in this pull request?\n\nSince 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:\n```java\n public Class[] getParameterTypes() {\n return parameterTypes.clone();\n }\n```\n`getParameterCount` returns amount of parameters directly:\n```java\n public int getParameterCount() { return parameterTypes.length; }\n```\n\n### Why are the changes needed?\nTo avoid redundant arrays creation.\n\n### Does this PR introduce _any_ user-facing change?\nNo\n\n### How was this patch tested?\nBy existing unit tests\n\nCloses #40422 from NarekDW/reflection-get-parameter-count.\n\nAuthored-by: narek_karapetian \nSigned-off-by: Sean Owen ","shortMessageHtmlLink":"[SPARK-42803][CORE][SQL][ML] Use getParameterCount function instead o…"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADBkzq4wA","startCursor":null,"endCursor":null}},"title":"Activity · suesunss/spark"}