cloud-fan commented on a change in pull request #35768:
URL: https://github.com/apache/spark/pull/35768#discussion_r825630739
##########
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) = {
Review comment:
It does not. V2 Predicate uses `String[]` to represent field reference,
no need to quote. It's only a problem in v1 Filter and we must take care of it
when converting v1 to v2.
--
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]