cloud-fan commented on a change in pull request #26463: [SPARK-29837][SQL] 
PostgreSQL dialect: cast to boolean
URL: https://github.com/apache/spark/pull/26463#discussion_r345004218
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/PostgreSQLDialectQuerySuite.scala
 ##########
 @@ -36,7 +36,8 @@ class PostgreSQLDialectQuerySuite extends QueryTest with 
SharedSparkSession {
     }
 
     Seq("o", "abc", "").foreach { input =>
-      checkAnswer(sql(s"select cast('$input' as boolean)"), Row(null))
+      intercept[IllegalArgumentException](
+        checkAnswer(sql(s"select cast('$input' as boolean)"), Row(null)))
 
 Review comment:
   since we expect error here, we can just run `sql(s"select cast('$input' as 
boolean)").collect`

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