File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2557,12 +2557,14 @@ class DataFrameSuite extends QueryTest
25572557 }
25582558
25592559 test(" SPARK-32816: aggregating multiple distinct DECIMAL columns" ) {
2560- spark.range(0 , 100 , 1 , 1 )
2561- .selectExpr(" id" , " cast(id as decimal(9, 0)) as decimal_col" )
2562- .createOrReplaceTempView(" test_table" )
2563- checkAnswer(
2564- sql(" select avg(distinct decimal_col), sum(distinct decimal_col) from test_table" ),
2565- Row (49.5 , 4950 ))
2560+ withTempView(" test_table" ) {
2561+ spark.range(0 , 100 , 1 , 1 )
2562+ .selectExpr(" id" , " cast(id as decimal(9, 0)) as decimal_col" )
2563+ .createOrReplaceTempView(" test_table" )
2564+ checkAnswer(
2565+ sql(" select avg(distinct decimal_col), sum(distinct decimal_col) from test_table" ),
2566+ Row (49.5 , 4950 ))
2567+ }
25662568 }
25672569}
25682570
You can’t perform that action at this time.
0 commit comments