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

    https://github.com/apache/spark/pull/10750#discussion_r49679753
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
 ---
    @@ -480,10 +480,120 @@ private[sql] object DataSourceStrategy extends 
Strategy with Logging {
           case expressions.Contains(a: Attribute, Literal(v: UTF8String, 
StringType)) =>
             Some(sources.StringContains(a.name, v.toString))
     
    +      case expressions.BinaryComparison(BinaryArithmetic(left, right), 
Literal(v, t)) =>
    +        translateArithemiticOPFilter (predicate)
    +      case expressions.BinaryComparison(Literal(v, t), 
BinaryArithmetic(left, right)) =>
    +        translateArithemiticOPFilter (predicate)
    +        
           case _ => None
         }
       }
     
    +  private def translateArithemiticOPFilter(predicate: Expression): 
Option[Filter] = {
    +    predicate match {
    +      case expressions.EqualTo(Add(left, right), Literal(v, t)) =>
    +        Some(sources.ArithmeticOPEqualTo(Add(left, right), 
convertToScala(v, t)))
    --- End diff --
    
    As described in 
[SPARK-10195](https://issues.apache.org/jira/browse/SPARK-10195), it looks now 
data sources API exposes Catalyst's internal types through its Filter 
interfaces. I think this might have to be hidden.


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