urosstan-db commented on code in PR #50921:
URL: https://github.com/apache/spark/pull/50921#discussion_r2197693056
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala:
##########
@@ -121,6 +123,112 @@ case class JDBCScanBuilder(
}
}
+ override def isOtherSideCompatibleForJoin(other: SupportsPushDownJoin):
Boolean = {
+ other.isInstanceOf[JDBCScanBuilder] &&
+ jdbcOptions.url == other.asInstanceOf[JDBCScanBuilder].jdbcOptions.url
Review Comment:
We can't do comparison on entire options map because table/query are in
options. Since JDBC connector have various options and unrecognized DF options
goes to properties of JDBC connection, it would be ideal to make allowlist for
options that does not prevent JOIN pushdown.
Something like (we would need some better name):
`def getOptionsDoesNotPreventJoinPushdown() = Seq("query", "dbtable")`
And then in JDBC scan builder, condition would be:
```
this.options.diff(this.getOptionsDoesNotPreventJoinPushdown) ==
other.options.diff(other.getOptionsDoesNotPreventJoinPushdown)
```
--
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]