spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatorsmile <...@git.apache.org>
Subject [GitHub] spark pull request #19801: [SPARK-22592][SQL] cleanup filter converting for ...
Date Thu, 23 Nov 2017 23:23:03 GMT
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19801#discussion_r152880027
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -643,9 +607,11 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
     
         object ExtractableLiterals {
           def unapply(exprs: Seq[Expression]): Option[Seq[String]] = {
    -        exprs.map(ExtractableLiteral.unapply).foldLeft(Option(Seq.empty[String])) {
    -          case (Some(accum), Some(value)) => Some(accum :+ value)
    -          case _ => None
    +        val extractables = exprs.map(ExtractableLiteral.unapply)
    +        if (extractables.nonEmpty && extractables.forall(_.isDefined)) {
    --- End diff --
    
    -> `if (extractables.exists(_.isDefined))`


---

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


Mime
View raw message