Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-44640][PYTHON][FOLLOW-UP] Update UDTF error messages to include method name #42726

Closed

Conversation

allisonwang-db
Copy link
Contributor

@allisonwang-db allisonwang-db commented Aug 29, 2023

What changes were proposed in this pull request?

This PR is a follow-up for SPARK-44640 to make the error message of a few UDTF errors more informative by including the method name in the error message (eval or terminate).

Why are the changes needed?

To improve error messages.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests.

Was this patch authored or co-authored using generative AI tooling?

No

@allisonwang-db
Copy link
Contributor Author

cc @ueshin

@@ -770,6 +770,7 @@ def verify_result(result):
message_parameters={
"type_name": type(result).__name__,
"value": str(result),
"func": f.__name__,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should do the same thing for UDTF_RETURN_SCHEMA_MISMATCH or other error classes if possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I will update the other places.

@allisonwang-db allisonwang-db changed the title [SPARK-44640][PYTHON][FOLLOW-UP] Update INVALID_ARROW_UDTF_RETURN_TYPE error message [SPARK-44640][PYTHON][FOLLOW-UP] Update UDTF error messages to include method name Aug 29, 2023
@github-actions github-actions bot added the SQL label Aug 30, 2023
@zhengruifeng
Copy link
Contributor

@allisonwang-db the failure seems related

@allisonwang-db
Copy link
Contributor Author

We need this PR in branch-3.5 as well.

@ueshin
Copy link
Member

ueshin commented Sep 2, 2023

Thanks! merging to master/3.5.

@ueshin ueshin closed this in 3e22c86 Sep 2, 2023
@ueshin
Copy link
Member

ueshin commented Sep 2, 2023

@allisonwang-db There is a conflict with 3.5. Could you help fix it and submit another PR? Thanks.

allisonwang-db added a commit to allisonwang-db/spark that referenced this pull request Sep 6, 2023
…e method name

This PR is a follow-up for SPARK-44640 to make the error message of a few UDTF errors more informative by including the method name in the error message (`eval` or `terminate`).

To improve error messages.

No

Existing tests.

No

Closes apache#42726 from allisonwang-db/SPARK-44640-follow-up.

Authored-by: allisonwang-db <[email protected]>
Signed-off-by: Takuya UESHIN <[email protected]>
(cherry picked from commit 3e22c86)
Signed-off-by: allisonwang-db <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants