HyukjinKwon commented on a change in pull request #25008: [SPARK-28213][SQL] 
Replace ColumnarBatchScan with equivilant from Columnar
URL: https://github.com/apache/spark/pull/25008#discussion_r307570076
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/LogicalPlanTagInSparkPlanSuite.scala
 ##########
 @@ -44,9 +44,14 @@ class LogicalPlanTagInSparkPlanSuite extends 
TPCDSQuerySuite {
   }
 
   // A scan plan tree is a plan tree that has a leaf node under zero or more 
Project/Filter nodes.
-  private def isScanPlanTree(plan: SparkPlan): Boolean = plan match {
-    case p: ProjectExec => isScanPlanTree(p.child)
-    case f: FilterExec => isScanPlanTree(f.child)
+  // Because of how codegen and columnar to row transitions work, we may have 
InputAdaptors
+  // and ColumnarToRow transformations in the middle of it, but they will not 
have the tag
+  // we want, so skip them if they are the first thing we see
+  private def isScanPlanTree(plan: SparkPlan, first: Boolean): Boolean = plan 
match {
+    case i: InputAdapter if !first => isScanPlanTree(i.child, false)
 
 Review comment:
   Why is `InputAdapter` pop up?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to