You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/21 09:48:24 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #27648: [SPARK-24994][SQL] : Support filter pushdown for short and byte without explicit casting

HyukjinKwon commented on a change in pull request #27648: [SPARK-24994][SQL] : Support filter pushdown for short and byte without explicit casting
URL: https://github.com/apache/spark/pull/27648#discussion_r382488098
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
 ##########
 @@ -443,31 +443,63 @@ object DataSourceStrategy {
     case expressions.EqualTo(Literal(v, t), a: Attribute) =>
       Some(sources.EqualTo(a.name, convertToScala(v, t)))
 
+    case expressions.EqualTo(Cast(c, dt, tz), Literal(v, t)) if c.isInstanceOf[Attribute] =>
+      Some(sources.EqualTo(c.asInstanceOf[Attribute].name, convertToScala(v, t)))
+    case expressions.EqualTo(Literal(v, t), Cast(c, dt, tz)) if c.isInstanceOf[Attribute] =>
+      Some(sources.EqualTo(c.asInstanceOf[Attribute].name, convertToScala(v, t)))
 
 Review comment:
   cc @liancheng FYI

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org