Skip to content

[SPARK-35278][SQL][2.4] Invoke should find the method with correct number of parameters - #32412

Closed
viirya wants to merge 1 commit into
apache:branch-2.4from
viirya:SPARK-35278-2.4
Closed

[SPARK-35278][SQL][2.4] Invoke should find the method with correct number of parameters#32412
viirya wants to merge 1 commit into
apache:branch-2.4from
viirya:SPARK-35278-2.4

Conversation

@viirya

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This patch fixes Invoke expression when the target object has more than one method with the given method name. This is 2.4 backport of #32404.

Why are the changes needed?

Invoke will find out the method on the target object with given method name. If there are more than one method with the name, currently it is undeterministic which method will be used. We should add the condition of parameter number when finding the method.

Does this PR introduce any user-facing change?

Yes, fixed a bug when using Invoke on a object where more than one method with the given method name.

How was this patch tested?

Unit test.

@viirya

Copy link
Copy Markdown
MemberAuthor

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42654/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42654/

@SparkQA

Copy link
Copy Markdown

Test build #138133 has finished for PR 32412 at commit 84e0f17.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya

Copy link
Copy Markdown
MemberAuthor

Thanks @maropu! Merging to 2.4.

viirya added a commit that referenced this pull request May 1, 2021
…mber of parameters
### What changes were proposed in this pull request?
This patch fixes `Invoke` expression when the target object has more than one method with the given method name. This is 2.4 backport of #32404.
### Why are the changes needed?
`Invoke` will find out the method on the target object with given method name. If there are more than one method with the name, currently it is undeterministic which method will be used. We should add the condition of parameter number when finding the method.
### Does this PR introduce _any_ user-facing change?
Yes, fixed a bug when using `Invoke` on a object where more than one method with the given method name.
### How was this patch tested?
Unit test.
Closes#32412 from viirya/SPARK-35278-2.4.
Authored-by: Liang-Chi Hsieh <viirya@gmail.com>
Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com>
@viiryaviirya closed this May 1, 2021
@viirya
viirya deleted the SPARK-35278-2.4 branch May 1, 2021 21:59
@dongjoon-hyun

Copy link
Copy Markdown
Member

+1, late LGTM. Thank you all!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@viirya@SparkQA@dongjoon-hyun@maropu