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

    https://github.com/apache/spark/pull/9399#discussion_r43590582
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/sources/FilteredScanSuite.scala ---
    @@ -44,16 +44,46 @@ case class SimpleFilteredScan(from: Int, to: 
Int)(@transient val sqlContext: SQL
           StructField("b", IntegerType, nullable = false) ::
           StructField("c", StringType, nullable = false) :: Nil)
     
    +  /**
    +   * Given an array of [[Filter]]s, returns an array of [[Filter]]s that 
this data source relation
    +   * cannot handle.  Spark SQL will apply all returned [[Filter]]s against 
rows returned by this
    +   * data source relation.
    +   *
    +   * @since 1.6.0
    +   */
    +  override def unhandledFilters(filters: Array[Filter]): Array[Filter] = {
    +    def unhandled(filter: Filter): Boolean = {
    +      filter match {
    +        case EqualTo("b", v) => true
    +        case EqualNullSafe("b", v) => true
    +        case LessThan("b", v: Int) => true
    +        case LessThanOrEqual("b", v: Int) => true
    +        case GreaterThan("b", v: Int) => true
    +        case GreaterThanOrEqual("b", v: Int) => true
    +        case In("b", values) => true
    +        case IsNull("b") => true
    +        case IsNotNull("b") => true
    +        case Not(pred) => unhandled(pred)
    +        case And(left, right) => unhandled(left) || unhandled(right)
    +        case Or(left, right) => unhandled(left) || unhandled(right)
    +        case _ => false
    --- End diff --
    
    Which tests trigger this case?


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