MaxGekk commented on code in PR #48144:
URL: https://github.com/apache/spark/pull/48144#discussion_r1869662382


##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/PostgresIntegrationSuite.scala:
##########
@@ -252,6 +253,17 @@ class PostgresIntegrationSuite extends 
DockerJDBCIntegrationV2Suite with V2JDBCT
     }
   }
 
+  test("SPARK-49695: Postgres fix xor push-down") {
+    val df = spark.sql(s"select dept, name from $catalogName.employee where 
dept ^ 6 = 0")
+    val rows = df.collect()
+    assert(df.queryExecution.sparkPlan.collectFirst {
+      case f: FilterExec => f
+    }.isEmpty)
+    assert(rows.length == 1)
+    assert(rows(0).getInt(0) === 6)
+    assert(rows(0).getString(1) === "jen")

Review Comment:
   Could you use `checkAnswer`, please.



##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/PostgresIntegrationSuite.scala:
##########
@@ -252,6 +253,17 @@ class PostgresIntegrationSuite extends 
DockerJDBCIntegrationV2Suite with V2JDBCT
     }
   }
 
+  test("SPARK-49695: Postgres fix xor push-down") {
+    val df = spark.sql(s"select dept, name from $catalogName.employee where 
dept ^ 6 = 0")
+    val rows = df.collect()
+    assert(df.queryExecution.sparkPlan.collectFirst {
+      case f: FilterExec => f
+    }.isEmpty)

Review Comment:
   ```suggestion
       assert(!df.queryExecution.sparkPlan.exists(_.isInstanceOf[FilterExec]))
   ```



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