pan3793 commented on PR #57831:
URL: https://github.com/apache/spark/pull/57831#issuecomment-5277458439

   Thanks @j1wonpark for the rework, and @nchammas for the principle, which I 
agree with in general: a SQLSTATE belongs to the condition, sub-conditions 
should stay in their condition's error class, and the `HY000`/`08` grouping was 
wrong from the start.
   
   I traced how existing clients consume these names before concluding this 
case deserves an exception. The condition names are a de facto wire contract: 
pre-4.3 clients match `INVALID_HANDLE.SESSION_CHANGED` and 
`INVALID_HANDLE.SESSION_NOT_FOUND` for session invalidation and reattach 
re-execution, and Connect promises independent server upgrades. The rename is 
not just a string change: Scala `ResponseValidator` stops marking the session 
invalid, so after a restart `SparkSession.getOrCreate` keeps returning the 
stale session instead of recreating it; Python `core.py` stops setting 
`_closed=True`, so the client keeps re-hitting the dead session instead of 
failing fast with `NO_ACTIVE_SESSION`. Nothing in a new client can repair that 
direction.
   
   The per-sub-condition `sqlState` override is the only way to emit `08003` 
without changing the wire names. So: keep the principle as the default for new 
conditions, allow the override here as a documented wire-compatibility 
exception, and state in the schema/README that it does not set a precedent for 
regrouping sub-conditions.
   
   cc @HyukjinKwon for thoughts on the PySpark side.
   


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