Skip to content

Commit

Permalink
addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kiszk committed May 12, 2017
1 parent 8b6ba75 commit 1f19c80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -908,11 +908,7 @@ object CodeGenerator extends Logging {
// Cache.get() may wrap the original exception. See the following URL
// http://google.github.io/guava/releases/14.0/api/docs/com/google/common/cache/
// Cache.html#get(K,%20java.util.concurrent.Callable)
case e : UncheckedExecutionException =>
val excChains = ExceptionUtils.getThrowables(e)
val exc = if (excChains.length == 1) excChains(0) else excChains(excChains.length - 2)
throw exc
case e : ExecutionError =>
case e @ (_: UncheckedExecutionException | _: ExecutionError) =>
val excChains = ExceptionUtils.getThrowables(e)
val exc = if (excChains.length == 1) excChains(0) else excChains(excChains.length - 2)
throw exc
Expand Down Expand Up @@ -973,7 +969,7 @@ object CodeGenerator extends Logging {
case e: CompileException =>
val msg = s"failed to compile: $e\n$formatted"
logError(msg, e)
throw new CompileException(msg, e.asInstanceOf[CompileException].getLocation)
throw new CompileException(msg, e.getLocation)
}
evaluator.getClazz().newInstance().asInstanceOf[GeneratedClass]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ object InterpretedPredicate {
def create(expression: Expression): InterpretedPredicate = new InterpretedPredicate(expression)
}

class InterpretedPredicate(expression: Expression) extends BasePredicate {
def eval(r: InternalRow): Boolean = expression.eval(r).asInstanceOf[Boolean]
case class InterpretedPredicate(expression: Expression) extends BasePredicate {
override def eval(r: InternalRow): Boolean = expression.eval(r).asInstanceOf[Boolean]
}

/**
Expand Down

0 comments on commit 1f19c80

Please sign in to comment.