Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
icexelloss committed Jul 27, 2018
1 parent 6b22fea commit b25936d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ object ExtractPythonUDFFromAggregate extends Rule[LogicalPlan] {
*/
object ExtractPythonUDFs extends Rule[SparkPlan] with PredicateHelper {

private case class EvalTypeHolder(var evalType: Int = -1) {
private case class EvalTypeHolder(private var evalType: Int = -1) {

def isSet: Boolean = evalType >= 0

Expand Down Expand Up @@ -135,7 +135,7 @@ object ExtractPythonUDFs extends Rule[SparkPlan] with PredicateHelper {
case udf: PythonUDF if PythonUDF.isScalarPythonUDF(udf)
&& (!firstEvalType.isSet || firstEvalType.get == udf.evalType)
&& canEvaluateInPython(udf) =>
firstEvalType.evalType = udf.evalType
firstEvalType.set(udf.evalType)
Seq(udf)
case e => e.children.flatMap(collectEvaluableUDFs(_, firstEvalType))
}
Expand Down

0 comments on commit b25936d

Please sign in to comment.