dongjoon-hyun commented on a change in pull request #25165: 
[SPARK-28201][SQL][TEST][FOLLOWUP] Update Integration test suite according to 
the new exception message
URL: https://github.com/apache/spark/pull/25165#discussion_r303619206
 
 

 ##########
 File path: 
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala
 ##########
 @@ -376,8 +376,7 @@ class OracleIntegrationSuite extends 
DockerJDBCIntegrationSuite with SharedSQLCo
     val e = intercept[org.apache.spark.SparkException] {
       spark.read.jdbc(jdbcUrl, "tableWithCustomSchema", new 
Properties()).collect()
     }
-    assert(e.getMessage.contains(
-      "requirement failed: Decimal precision 39 exceeds max precision 38"))
+    assert(e.getMessage.contains("Decimal precision 39 exceeds max precision 
38"))
 
 Review comment:
   Thank you for review, @mgaido91 .
   
   Sure, of course, we can check the underlying exception type by `e.getCause` 
from `SparkException` additionally. I'll add that.
   
   However, `message checking` is a more fine-grained verification. As you 
know, `ArithmeticException` and `ParseException` are not specific. For example, 
`ArithmeticException` can be caused by `divide by zero`. We should check the 
error message always.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to