dongjoon-hyun commented on a change in pull request #31319:
URL: https://github.com/apache/spark/pull/31319#discussion_r564267501
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3868,6 +3868,43 @@ class SQLQuerySuite extends QueryTest with
SharedSparkSession with AdaptiveSpark
assert(unions.size == 1)
}
+
+ test("SPARK-34212 Parquet should read decimals correctly") {
+ // Decimal(2, 1) for INT32-backed decimal, Decimal(17, 2) for INT64-backed
decimal
+ val df = sql("SELECT 1.0 a, CAST(100 AS DECIMAL(17, 2)) b, map(1, 2) c")
+
+ withTempPath { path =>
+ df.write.parquet(path.toString)
+
+ // 1. Complex schema disables vectorization automatically.
Review comment:
Yep. I agree with you, @cloud-fan . Initially, this test case is
designed to demonstrate that why some customers don't need to turn off the
Spark's default configuration (enableVector...) in their environment. It's a
leftover. Since the review is finished, I'll remove this ASAP.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]