Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/17114#discussion_r104114722
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveInlineTables.scala
---
@@ -95,10 +95,14 @@ object ResolveInlineTables extends Rule[LogicalPlan] {
InternalRow.fromSeq(row.zipWithIndex.map { case (e, ci) =>
val targetType = fields(ci).dataType
try {
- if (e.dataType.sameType(targetType)) {
- e.eval()
+ val castedExpr = if (e.dataType.sameType(targetType)) {
+ e
} else {
- Cast(e, targetType).eval()
+ Cast(e, targetType)
+ }
+ castedExpr match {
+ case te: TimeZoneAwareExpression =>
te.withTimeZone(conf.sessionLocalTimeZone).eval()
--- End diff --
Shouldn't we traverse the entire tree expression to check for time zone
aware expressions?
---
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]