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

   ### What changes were proposed in this pull request?
   
   Convert streaming `QueryStartedEvent` job tags with Python `str()` and add a 
listener regression case with a nonempty job tag.
   
   ### Why are the changes needed?
   
   Py4J can convert a Java string to a Python `str` before 
`QueryStartedEvent.fromJObject` reads it. Calling `.toString()` on that value 
raises `AttributeError`, so the Python listener does not receive 
`onQueryStarted` when the query has job tags. A query started after 
`SparkContext.addJobTag(...)` exercises this path.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Python streaming listeners now receive `onQueryStarted` with the 
query's nonempty job tags. Previously the callback failed during event 
conversion.
   
   ### How was this patch tested?
   
   The existing streaming listener test now adds a job tag before starting a 
query, checks that the Python start event contains it, and clears the tag 
during cleanup. Both modified Python files passed `python3 -m py_compile`. The 
full Spark test suite has not been run locally; this is a draft for CI and 
review.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-6).
   


-- 
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