sunxiaoguang commented on code in PR #49452: URL: https://github.com/apache/spark/pull/49452#discussion_r1916244276
########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala: ########## @@ -61,6 +61,34 @@ private case class OracleDialect() extends JdbcDialect with SQLConfHelper with N } else { super.visitAggregateFunction(funcName, isDistinct, inputs) } + + private def compareBlob(lhs: Expression, operator: String, rhs: Expression): String = { + val l = inputToSQL(lhs) + val r = inputToSQL(rhs) + val op = if (operator == "<=>") "=" else operator + val compare = s"DBMS_LOB.COMPARE($l, $r) $op 0" + if (operator == "<=>") { + s"(($l IS NOT NULL AND $r IS NOT NULL AND $compare) OR ($l IS NULL AND $r IS NULL))" Review Comment: Even if we change signature of visitBinaryComparison to make the override better, we still cannot get rid of these dirty rewrite of `<=>` and `DBMS_LOB.COMPARE`. -- 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