-
Notifications
You must be signed in to change notification settings - Fork 28k
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-46820][PYTHON] Fix error message regression by restoring new_msg
#44859
Conversation
createDataFrame
fails nullability checknew_msg
Thanks @HyukjinKwon for reviewing. Just fixed regressions from past few PRs, and updated the PR title & description accordingly. |
new_msg
new_msg
new_msg
new_msg
python/pyspark/sql/types.py
Outdated
message_parameters={"arg_name": "obj"}, | ||
error_class="FIELD_NOT_NULLABLE", | ||
message_parameters={ | ||
"field_name": name if name is not None else "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the error message would look weird if this is an empty string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separated into two error class FIELD_NOT_NULLABLE
and FIELD_NOT_NULLABLE_WITN_NAME
. Please let me know if any other suggestions!
Merged to master. |
What changes were proposed in this pull request?
This PR proposes to fix error message regression by restoring
new_msg
.Why are the changes needed?
In the past few PRs, we mistakenly remove
new_msg
which introduces error message regression.Does this PR introduce any user-facing change?
No API change, but the user-facing error message is improved
Before
After
How was this patch tested?
The existing CI should pass
Was this patch authored or co-authored using generative AI tooling?
No.