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

    https://github.com/apache/spark/pull/10750#discussion_r49681620
  
    --- 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 --
    
    Hm.. I see. but for me it looks this might have to hide `expression._`. In 
this way, the `expression._` can be accessed in datasource level. I believe the 
reason way `source._` is implemented is, to hide `expression._` which has been 
changed rapidly version by version.


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