cloud-fan commented on a change in pull request #35768:
URL: https://github.com/apache/spark/pull/35768#discussion_r828050185



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/V2FiltersSuite.scala
##########
@@ -18,182 +18,166 @@
 package org.apache.spark.sql.execution.datasources.v2
 
 import org.apache.spark.SparkFunSuite
-import org.apache.spark.sql.connector.expressions.{FieldReference, Literal, 
LiteralValue}
+import org.apache.spark.sql.connector.expressions.{Expression, FieldReference, 
Literal, LiteralValue}
 import org.apache.spark.sql.connector.expressions.filter._
 import org.apache.spark.sql.execution.datasources.v2.FiltersV2Suite.ref
-import org.apache.spark.sql.types.IntegerType
+import org.apache.spark.sql.types.{BooleanType, IntegerType}
 import org.apache.spark.unsafe.types.UTF8String
 
 class FiltersV2Suite extends SparkFunSuite {
 
   test("nested columns") {
-    val filter1 = new EqualTo(ref("a", "B"), LiteralValue(1, IntegerType))
-    assert(filter1.references.map(_.describe()).toSeq == Seq("a.B"))
-    assert(filter1.describe.equals("a.B = 1"))
+    val predicate1 =
+      new Predicate("=", Array[Expression](ref("a", "B"), LiteralValue(1, 
IntegerType)))
+    assert(predicate1.references.map(_.describe()).toSeq == Seq("a.B"))
+    assert(predicate1.describe.equals("(a.B) = (1)"))

Review comment:
       Can we make an exception for v2 `Expression` without children? Don't 
wrap them with `(...)`




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