dongjoon-hyun opened a new pull request, #598:
URL: https://github.com/apache/spark-connect-swift/pull/598

   ### What changes were proposed in this pull request?
   
   This PR aims to fix `SparkSession` to reject an invalid `session_id` in the 
connection string instead of silently truncating it.
   
   - Read the whole `session_id` value (`[^;]*`) instead of stopping at the 
first character outside `[a-zA-Z0-9-]`.
   - Throw `SparkConnectError.InvalidSessionID` if the value is not a valid 
UUID.
   
   ### Why are the changes needed?
   
   `;session_id=abc_def` was read as `abc`, and `;session_id=<uuid>_suffix` was 
accepted as `<uuid>`. Like the Python client, an invalid `session_id` should be 
an error.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. An invalid `session_id` such as `abc_def` now fails with 
`InvalidSessionID`. Valid UUIDs behave as before.
   
   ### How was this patch tested?
   
   Added `SparkSessionTests.invalidSessionIDInConnectionString`. It needs no 
Spark Connect server. I could not run it locally because the `Testing` module 
is missing, so CI should confirm it.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 5.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