Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10470#discussion_r48566796
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala
 ---
    @@ -295,25 +318,17 @@ private[sql] class JDBCRDD(
       /**
        * `filters`, but as a WHERE clause suitable for injection into a SQL 
query.
        */
    -  private val filterWhereClause: String = {
    -    val filterStrings = filters.map(JDBCRDD.compileFilter).filter(_ != 
null)
    -    if (filterStrings.size > 0) {
    -      val sb = new StringBuilder("WHERE ")
    -      filterStrings.foreach(x => sb.append(x).append(" AND "))
    -      sb.substring(0, sb.length - 5)
    -    } else ""
    -  }
    +  private val filterWhereClause: Seq[Option[String]] = 
filters.map(JDBCRDD.compileFilter)
    --- End diff --
    
    should this just take Seq[String] by adding a flatMap to 
filters.map(JDBCRDD.compileFilter)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to