File tree Expand file tree Collapse file tree
catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer
core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -728,8 +728,8 @@ object FoldablePropagation extends Rule[LogicalPlan] {
728728 stop = true
729729 j
730730
731- // Operators that operate on objects should only have expressions from encoders, which
732- // should never have foldable expressions .
731+ // These 3 operators take attributes as constructor parameters, and these attributes
732+ // can't be replaced by alias .
733733 case m : MapGroups =>
734734 stop = true
735735 m
Original file line number Diff line number Diff line change @@ -884,14 +884,12 @@ class DatasetSuite extends QueryTest with SharedSQLContext {
884884
885885 import df .sparkSession .implicits ._
886886
887- assertResult( Seq ()) {
887+ checkDataset(
888888 df.withColumn(" b" , lit(0 )).as[ClassData ]
889- .groupByKey(_.a).flatMapGroups { case (x, iter) => List [Int ]() }.collect().toSeq
890- }
891- assertResult(Seq ()) {
889+ .groupByKey(_.a).flatMapGroups { case (x, iter) => List [Int ]() })
890+ checkDataset(
892891 df.withColumn(" b" , expr(" 0" )).as[ClassData ]
893- .groupByKey(_.a).flatMapGroups { case (x, iter) => List [Int ]() }.collect().toSeq
894- }
892+ .groupByKey(_.a).flatMapGroups { case (x, iter) => List [Int ]() })
895893 }
896894}
897895
You can’t perform that action at this time.
0 commit comments