Skip to content

Commit

Permalink
[SQL] [MINOR] Skip unresolved expression for InConversion
Browse files Browse the repository at this point in the history
Author: scwf <[email protected]>

Closes apache#6145 from scwf/InConversion and squashes the following commits:

5c8ac6b [scwf] minir fix for InConversion
  • Loading branch information
scwf authored and liancheng committed May 17, 2015
1 parent 1a7b9ce commit edf09ea
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ trait HiveTypeCoercion {
*/
object InConversion extends Rule[LogicalPlan] {
def apply(plan: LogicalPlan): LogicalPlan = plan transformAllExpressions {
// Skip nodes who's children have not been resolved yet.
case e if !e.childrenResolved => e

case i @ In(a, b) if b.exists(_.dataType != a.dataType) =>
i.makeCopy(Array(a, b.map(Cast(_, a.dataType))))
}
Expand Down

0 comments on commit edf09ea

Please sign in to comment.