MaxGekk commented on a change in pull request #35670:
URL: https://github.com/apache/spark/pull/35670#discussion_r820854751
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala
##########
@@ -181,4 +191,72 @@ class QueryExecutionErrorsSuite extends QueryTest with
SharedSparkSession {
assert(e2.getSqlState === "0A000")
assert(e2.getMessage === "The feature is not supported: Pivot not after a
groupBy.")
}
+
+ test("INCONSISTENT_BEHAVIOR_CROSS_VERSION: " +
+ "compatibility with Spark 2.4/3.2 in reading/writing dates") {
+
+ // Fail to read ancient datetime values.
+ withSQLConf(SQLConf.PARQUET_REBASE_MODE_IN_READ.key -> EXCEPTION.toString)
{
+ val fileName = "before_1582_date_v2_4_5.snappy.parquet"
+ val filePath = getResourceParquetFilePath("test-data/" + fileName)
+ val e = intercept[SparkException] {
+ spark.read.parquet(filePath).collect()
+ }.getCause.asInstanceOf[SparkUpgradeException]
+
+ assert(e.getErrorClass === "INCONSISTENT_BEHAVIOR_CROSS_VERSION")
+ assert(e.getMessage
+ .startsWith("You may get a different result due to the upgrading to
Spark >= 3.0: \n" +
Review comment:
Could you check entire error message, please. See the motivation for
that in PR's description https://github.com/apache/spark/pull/35416
--
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]