sunxiaoguang commented on code in PR #49452:
URL: https://github.com/apache/spark/pull/49452#discussion_r1912446075


##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/V2JDBCTest.scala:
##########
@@ -986,4 +986,23 @@ private[v2] trait V2JDBCTest extends SharedSparkSession 
with DockerIntegrationFu
   test("scan with filter push-down with date time functions") {
     testDatetime(s"$catalogAndNamespace.${caseConvert("datetime")}")
   }
+
+  test("SPARK-50792 Format binary data as a binary literal in JDBC.") {
+    val tableName = s"$catalogName.test_binary_literal"
+    withTable(tableName) {
+      // Unfornately, Oracle can only compare two BLOBs with a special 
function dbms_lob.compare
+      // The V2ExpressionSQLBuilder can not support rewriting the '=' operator.
+      // We don't test binary data on Oracle and do not support binary data on 
Oracle.
+      if (!this.isInstanceOf[OracleIntegrationSuite]) {

Review Comment:
   Yes, that requires a significant change in how V2ExpressionSQLBuilder works. 
The binary literal was not functioning before this PR anyway. We can ensure it 
works, at least on other databases, this time. Additionally, we can propose 
further design changes to V2ExpressionSQLBuilder to make it flexible enough to 
accommodate cases like this.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to