Handles type coercion for both IN expression with subquery and IN
expressions without subquery.
1. In the first case, find the common type by comparing the left hand side (LHS)
expression types against corresponding right hand side (RHS) expression derived
from the subquery expression's plan output. Inject appropriate casts in the
LHS and RHS side of IN expression.
2. In the second case, convert the value and in list expressions to the
common operator type by looking at all the argument types and finding
the closest one that all the arguments can be cast to. When no common
operator type is found the original expression will be returned and an
Analysis Exception will be raised at the type checking phase.
Handles type coercion for both IN expression with subquery and IN expressions without subquery. 1. In the first case, find the common type by comparing the left hand side (LHS) expression types against corresponding right hand side (RHS) expression derived from the subquery expression's plan output. Inject appropriate casts in the LHS and RHS side of IN expression.
2. In the second case, convert the value and in list expressions to the common operator type by looking at all the argument types and finding the closest one that all the arguments can be cast to. When no common operator type is found the original expression will be returned and an Analysis Exception will be raised at the type checking phase.