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

   ### What changes were proposed in this pull request?
   
   Consolidate the specialized PySpark `VALUE_NOT_TRUE` error condition into 
`VALUE_NOT_ALLOWED`. Classic and Spark Connect streaming 
`DataStreamWriter.trigger` now report the generic condition when `once` or 
`availableNow` is not `True`. The shared streaming tests assert the new 
condition in both modes.
   
   ### Why are the changes needed?
   
   `VALUE_NOT_TRUE` only represents a single allowed argument value and 
duplicates the generic allowed-values condition. Removing it reduces narrowly 
scoped error conditions and aligns the validation with other PySpark APIs.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Invalid `trigger(once=...)` and `trigger(availableNow=...)` calls now 
use `VALUE_NOT_ALLOWED` and its generic message. The exception type remains 
`PySparkValueError`.
   
   ### How was this patch tested?
   
   Added shared classic and Spark Connect test assertions. The focused PySpark 
test suite was not run. The JSON error-condition file was parsed successfully 
and no `VALUE_NOT_TRUE` references remain.
   
   ### 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