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

    https://github.com/apache/spark/pull/18160#discussion_r119751315
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
 ---
    @@ -370,18 +368,26 @@ case class DataSourceStrategy(conf: SQLConf) extends 
Strategy with Logging with
         // These metadata values make scan plans uniquely identifiable for 
equality checking.
         // TODO(SPARK-17701) using strings for equality checking is brittle
         val metadata: Map[String, String] = {
    -      val pairs = ArrayBuffer.empty[(String, String)]
    -
    +      val schemaString = 
StructType.fromAttributes(projects.map(_.toAttribute)).catalogString
           // Mark filters which are handled by the underlying DataSource with 
an Astrisk
    -      if (pushedFilters.nonEmpty) {
    -        val markedFilters = for (filter <- pushedFilters) yield {
    +      relation match {
    +        case LogicalRelation(_: CatalystScan, _, _) if 
candidatePredicates.nonEmpty =>
    +          val markedPredicates = for (predicate <- candidatePredicates) 
yield {
    +            if (handledPredicates.contains(predicate)) s"*$predicate" else 
s"$predicate"
    +          }
    +          Map(
    +            "PushedCatalystFilters" -> markedPredicates.mkString("[", ", 
", "]"),
    --- End diff --
    
    Yes, I think all filters (if exists) are pushed for `CatalystScan` and 
these are catalyst ones - 
https://github.com/apache/spark/blob/f3ed62a381897711d86fde27ab80bb70ed0b0513/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala#L271-L272.
    
    So, I intended to put them in `PushedCatalystFilters`.
    



---
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