File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -448,6 +448,22 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext {
448448 rand(Random .nextLong()), randn(Random .nextLong())
449449 ).foreach(assertValuesDoNotChangeAfterCoalesceOrUnion(_))
450450 }
451+
452+ private def assertNoExceptions (c : Column ): Unit = {
453+ for (wholeStage <- Seq (true , false )) {
454+ withSQLConf((SQLConf .WHOLESTAGE_CODEGEN_ENABLED .key, wholeStage.toString)) {
455+ spark.range(0 , 5 ).toDF(" a" ).agg(sum(" a" )).withColumn(" v" , c).collect()
456+ }
457+ }
458+ }
459+
460+ test(" [SPARK-19471] AggregationIterator does not initialize the generated result projection" +
461+ " before using it" ) {
462+ Seq (
463+ monotonically_increasing_id(), spark_partition_id(),
464+ rand(Random .nextLong()), randn(Random .nextLong())
465+ ).foreach(assertNoExceptions(_))
466+ }
451467}
452468
453469object DataFrameFunctionsSuite {
You can’t perform that action at this time.
0 commit comments