@@ -106,21 +106,16 @@ object ExprUtils extends SQLConfHelper with Serializable {
106106 }
107107
108108 private class CustomResolveTimeZone (timeZoneId : Option [String ]) extends Rule [LogicalPlan ] {
109- private val transformTimeZoneExprs : PartialFunction [Expression , Expression ] = {
110- case e : TimeZoneAwareExpression if e.timeZoneId.isEmpty =>
111- e.withTimeZone(timeZoneId.getOrElse(conf.sessionLocalTimeZone))
112- // Casts could be added in the subquery plan through the rule TypeCoercion while coercing
113- // the types between the value expression and list query expression of IN expression.
114- // We need to subject the subquery plan through ResolveTimeZone again to setup timezone
115- // information for time zone aware expressions.
116- case e : ListQuery => e.withNewPlan(apply(e.plan))
117- }
118-
119109 override def apply (plan : LogicalPlan ): LogicalPlan =
120- plan.resolveExpressionsWithPruning(
121- _.containsAnyPattern(LIST_SUBQUERY , TIME_ZONE_AWARE_EXPRESSION ),
122- ruleId
123- )(transformTimeZoneExprs)
110+ plan.resolveExpressionsWithPruning(_.containsAnyPattern(LIST_SUBQUERY , TIME_ZONE_AWARE_EXPRESSION )) {
111+ case e : TimeZoneAwareExpression if e.timeZoneId.isEmpty =>
112+ e.withTimeZone(timeZoneId.getOrElse(conf.sessionLocalTimeZone))
113+ // Casts could be added in the subquery plan through the rule TypeCoercion while coercing
114+ // the types between the value expression and list query expression of IN expression.
115+ // We need to subject the subquery plan through ResolveTimeZone again to setup timezone
116+ // information for time zone aware expressions.
117+ case e : ListQuery => e.withNewPlan(apply(e.plan))
118+ }
124119 }
125120
126121 private class TypeCoercionExecutor (timeZoneId : Option [String ]) extends RuleExecutor [LogicalPlan ] {
0 commit comments