sunchao commented on a change in pull request #34645:
URL: https://github.com/apache/spark/pull/34645#discussion_r752645500



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSetOperationsSuite.scala
##########
@@ -1355,6 +1357,45 @@ class DataFrameSetOperationsSuite extends QueryTest with 
SharedSparkSession {
       Row(Row(Seq(Seq(Row("bb", null))))) ::
       Row(Row(Seq(Seq(Row(null, "ba"))))) :: Nil)
   }
+
+  test("SPARK-37371: UnionExec should support columnar if all children support 
columnar") {
+    def checkIfColumnar(
+        plan: SparkPlan,
+        targetPlan: (SparkPlan) => Boolean,
+        isColumnar: Boolean): Unit = {
+      val target = plan.collect {
+        case p if targetPlan(p) => p
+      }
+      assert(target.nonEmpty)
+      if (isColumnar) {

Review comment:
       nit: can replace this with one line: 
`assert(target.forall(_.supportsColumnar == isColumnar))`




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