zhengruifeng opened a new pull request, #57236:
URL: https://github.com/apache/spark/pull/57236

   ### What changes were proposed in this pull request?
   
   Consolidate the specialized PySpark `VALUE_NOT_ANY_OR_ALL` error condition 
into the existing
   `VALUE_NOT_ALLOWED` condition. The classic and Spark Connect implementations 
of
   `DataFrame.dropna` now report the allowed values through the generic 
condition, and the shared
   test expectation is updated accordingly.
   
   ### Why are the changes needed?
   
   `VALUE_NOT_ANY_OR_ALL` is used only for `DataFrame.dropna(how=...)` and 
duplicates the existing
   generic condition for arguments restricted to a fixed set of values. 
Removing it reduces the
   number of narrowly scoped error conditions and aligns this validation with 
other PySpark APIs.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Invalid values for `DataFrame.dropna(how=...)` now use the 
`VALUE_NOT_ALLOWED` error
   condition and its generic message. Valid calls and exception types are 
unchanged.
   
   ### How was this patch tested?
   
   The focused PySpark test was not run. The JSON error-condition file was 
parsed successfully,
   `git diff --check` passed, and the existing shared error assertion was 
updated for both classic
   and Spark Connect execution modes.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to