TJX2014 commented on a change in pull request #29673:
URL: https://github.com/apache/spark/pull/29673#discussion_r484740633
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
##########
@@ -2555,6 +2555,19 @@ class DataFrameSuite extends QueryTest
val df = Seq(0.0 -> -0.0).toDF("pos", "neg")
checkAnswer(df.select($"pos" > $"neg"), Row(false))
}
+
+ test("SPARK-32816: aggregating multiple distinct DECIMAL columns") {
+ withTempPath { path =>
+ spark.range(0, 100, 1, 1)
+ .selectExpr("id", "cast(id as decimal(9, 0)) as decimal_col")
+ .write.mode("overwrite")
+ .parquet(path.getAbsolutePath)
+
spark.read.parquet(path.getAbsolutePath).createOrReplaceTempView("test_table")
Review comment:
`val df = spark.range(0, 50000, 1, 1).selectExpr("id", "cast(id as
decimal(9, 0)) as ss_ext_list_price")
df.createOrReplaceTempView("test_table")
sql("select avg(distinct ss_ext_list_price), sum(distinct ss_ext_list_price)
from test_table").explain` seems enough to reproduce.
----------------------------------------------------------------
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]