nija-at opened a new pull request, #50604:
URL: https://github.com/apache/spark/pull/50604

   ### What changes were proposed in this pull request?
   
   In Spark Connect, we guarantee that older clients are compatible with newer
   versions of the Spark Connect service.
   
   A previous change - e28c33bc - broke this compatibility by removing the
   "ansiConfig" field in the message parameters for two error codes -
   "CAST_OVERFLOW" and "CAST_INVALID_INPUT".
   
   The Spark Connect client includes GrpcExceptionConverter.scala[1] to
   convert error codes from the server to produce SQL compliant error codes
   on the client. The SQL compliant error codes and corresponding error
   messages are included in the error-conditions.json file. Older clients do not
   include the change (e28c33bc) to this file and still include the `ansiConfig`
   parameter. Later versions of the Spark Connect service don't return this
   parameter resulting in an internal error[2] that the correct error condition
   could not be formulated.
   
   This change reverts the changes on the server to continue producing the
   "ansiConfig" field so older clients can still correctly reformulate the 
error class. 
   
   [1]: 
https://github.com/apache/spark/blob/2ba156096e83adf7b0b2f5c38453d6fd37d95ded/sql/connect/common/src/main/scala/org/apache/spark/sql/connect/client/GrpcExceptionConverter.scala#L184
   [2]: 
https://github.com/apache/spark/blob/2ba156096e83adf7b0b2f5c38453d6fd37d95ded/common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala#L58
   
   ### Why are the changes needed?
   
   Explained above.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manual tests with the older clients and newer server.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.
   


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to