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

    https://github.com/apache/spark/pull/17087#discussion_r104955336
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
 ---
    @@ -213,12 +217,30 @@ case class FilterExec(condition: Expression, child: 
SparkPlan)
       protected override def doExecute(): RDD[InternalRow] = {
         val numOutputRows = longMetric("numOutputRows")
         child.execute().mapPartitionsWithIndexInternal { (index, iter) =>
    -      val predicate = newPredicate(condition, child.output)
    -      predicate.initialize(0)
    -      iter.filter { row =>
    -        val r = predicate.eval(row)
    -        if (r) numOutputRows += 1
    -        r
    +      try {
    +        val predicate = newPredicate(condition, child.output)
    +        predicate.initialize(0)
    +        iter.filter { row =>
    +          val r = predicate.eval(row)
    +          if (r) numOutputRows += 1
    +          r
    +        }
    +      } catch {
    +        // JaninoRuntimeException is in a nested exception if Java 
compilation error occurs
    +        case e: Exception if 
ExceptionUtils.getRootCause(e).isInstanceOf[JaninoRuntimeException] =>
    --- End diff --
    
    Good catch. I will make this wrapping more specific.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to