attilapiros commented on a change in pull request #34642:
URL: https://github.com/apache/spark/pull/34642#discussion_r752030107



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/Columnar.scala
##########
@@ -538,7 +539,13 @@ case class ApplyColumnarRulesAndInsertTransitions(
     } else if (plan.supportsColumnar) {
       // `outputsColumnar` is false but the plan outputs columnar format, so 
add a
       // to-row transition here.

Review comment:
       kinda outdated comment

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryTableScanExec.scala
##########
@@ -62,7 +63,7 @@ case class InMemoryTableScanExec(
   override val supportsColumnar: Boolean = {
     conf.cacheVectorizedReaderEnabled  &&
         !WholeStageCodegenExec.isTooManyFields(conf, relation.schema) &&
-        
relation.cacheBuilder.serializer.supportsColumnarOutput(relation.schema)
+        
relation.cacheBuilder.serializer.supportsColumnarOutput(relation.schema) && 
outputColumnar

Review comment:
       As evaluating the `outputColumnar` flag is one of the fastest in this 
expression (where only `&&` operators are used) I would move it before the 
`isTooManyFields` call (which uses a recursive function). 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to