Skip to content

Commit 029fb53

Browse files
committed
fix
1 parent 82a343c commit 029fb53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ object PushFoldableIntoBranches extends Rule[LogicalPlan] with PredicateHelper {
548548
foldables.nonEmpty && others.length < 2
549549
}
550550

551-
// Not all UnaryExpression support push into (if / case) branches, e.g. Alias.
551+
// Not all UnaryExpression can be pushed into (if / case) branches, e.g. Alias.
552552
private def supportedUnaryExpression(e: UnaryExpression): Boolean = e match {
553553
case _: IsNull | _: IsNotNull => true
554554
case _: UnaryMathExpression | _: Abs | _: Bin | _: Factorial | _: Hex => true
@@ -558,9 +558,11 @@ object PushFoldableIntoBranches extends Rule[LogicalPlan] with PredicateHelper {
558558
case _: GetDateField | _: LastDay => true
559559
case _: ExtractIntervalPart => true
560560
case _: ArraySetLike => true
561+
case _: ExtractValue => true
561562
case _ => false
562563
}
563564

565+
// Not all BinaryExpression can be pushed into (if / case) branches.
564566
private def supportedBinaryExpression(e: BinaryExpression): Boolean = e match {
565567
case _: BinaryComparison | _: StringPredicate | _: StringRegexExpression => true
566568
case _: BinaryArithmetic => true

0 commit comments

Comments
 (0)