beliefer commented on a change in pull request #35768:
URL: https://github.com/apache/spark/pull/35768#discussion_r825633044
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala
##########
@@ -94,54 +96,74 @@ object JDBCRDD extends Logging {
new StructType(columns.map(name => fieldMap(name)))
}
- /**
- * Turns a single Filter into a String representing a SQL expression.
- * Returns None for an unhandled filter.
- */
- def compileFilter(f: Filter, dialect: JdbcDialect): Option[String] = {
-
- def quote(colName: String): String = {
- val nameParts =
SparkSession.active.sessionState.sqlParser.parseMultipartIdentifier(colName)
- if(nameParts.length > 1) {
- throw
QueryCompilationErrors.commandNotSupportNestedColumnError("Filter push down",
colName)
- }
- dialect.quoteIdentifier(nameParts.head)
+ private def checkColumnName(colName: String) = {
+ val nameParts =
SparkSession.active.sessionState.sqlParser.parseMultipartIdentifier(colName)
+ if(nameParts.length > 1) {
+ throw QueryCompilationErrors.commandNotSupportNestedColumnError("Filter
push down", colName)
}
+ }
+ private[sql] def toV2(f: Filter): Option[Predicate] = {
Review comment:
I moved `toV2` to `JDBCRelation`.
--
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]