AngersZhuuuu commented on a change in pull request #34337:
URL: https://github.com/apache/spark/pull/34337#discussion_r740702059
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRebaseDatetimeSuite.scala
##########
@@ -164,7 +165,13 @@ abstract class ParquetRebaseDatetimeSuite
def successInRead(path: String): Unit = spark.read.parquet(path).collect()
def failInRead(path: String): Unit = {
val e = intercept[SparkException](spark.read.parquet(path).collect())
- assert(e.getCause.isInstanceOf[SparkUpgradeException])
+ // If SparkUpgradeException is thrown while reading file,
+ // it will be wrapped by QueryExecutionException.
+ if (e.getCause.isInstanceOf[QueryExecutionException]) {
Review comment:
> ```
> e.getCause match {
> case QueryExecutionException => assert(...)
> case SparkUpgradeException => // OK
> case _ => fail(...)
> }
> ```
>
> Yeah maybe not cleaner, it's OK
Won't need this change now.
--
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]