Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/17641#discussion_r111701221
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveInlineTables.scala
---
@@ -99,12 +99,9 @@ case class ResolveInlineTables(conf: SQLConf) extends
Rule[LogicalPlan] {
val castedExpr = if (e.dataType.sameType(targetType)) {
e
} else {
- Cast(e, targetType)
+ Cast(e, targetType, Some(conf.sessionLocalTimeZone))
}
- castedExpr.transform {
- case e: TimeZoneAwareExpression if e.timeZoneId.isEmpty =>
- e.withTimeZone(conf.sessionLocalTimeZone)
- }.eval()
+ castedExpr.eval()
--- End diff --
If there are nested expressions which are timezone aware, I think we still
need to attach time zone to them?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]