File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ case class CollapseCodegenStages(conf: SQLConf) extends Rule[SparkPlan] {
509509 val hasTooManyOutputFields =
510510 WholeStageCodegenExec .isTooManyFields(conf, plan.schema)
511511 val hasTooManyInputFields =
512- plan.children.find (p => WholeStageCodegenExec .isTooManyFields(conf, p.schema)).isDefined
512+ plan.children.exists (p => WholeStageCodegenExec .isTooManyFields(conf, p.schema))
513513 ! willFallback && ! hasTooManyOutputFields && ! hasTooManyInputFields
514514 case _ => false
515515 }
Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ case class InMemoryTableScanExec(
4646 override val supportCodegen : Boolean = {
4747 // In the initial implementation, for ease of review
4848 // support only primitive data types and # of fields is less than wholeStageMaxNumFields
49- relation.schema.fields.find (f => f.dataType match {
49+ relation.schema.fields.forall (f => f.dataType match {
5050 case BooleanType | ByteType | ShortType | IntegerType | LongType |
51- FloatType | DoubleType => false
52- case _ => true
53- }).isEmpty && ! WholeStageCodegenExec .isTooManyFields(conf, relation.schema)
51+ FloatType | DoubleType => true
52+ case _ => false
53+ }) && ! WholeStageCodegenExec .isTooManyFields(conf, relation.schema)
5454 }
5555
5656 private val columnIndices =
You can’t perform that action at this time.
0 commit comments