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

   ## What changes were proposed in this pull request?
   This PR aims to add a test for the error class INVALID_SYNTAX_FOR_CAST to 
`QueryExecutionErrors`.
   
   
   - the error class INVALID_INPUT_SYNTAX_FOR_NUMERIC_TYPE not exist!
   - removed as no longer used method: 
   def invalidInputSyntaxForNumericError(
         e: NumberFormatException,
         errorContext: String): NumberFormatException = {
       new NumberFormatException(s"${e.getMessage}. To return NULL instead, use 
'try_cast'. " +
        s"If necessary set ${SQLConf.ANSI_ENABLED.key} to false to bypass this 
error." + errorContext)
   
   ### Why are the changes needed?
   The changes improve test coverage, and document expected error messages in 
tests.
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   By running new test:
   ```
   $ build/sbt "sql/testOnly *QueryExecutionErrorsSuite*"
   ```


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