Skip to content

Commit 0857791

Browse files
committed
fix test
1 parent be7e864 commit 0857791

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ object TypeCoercion {
403403
/** Given a plan, add an extra project on top to widen some columns' data types. */
404404
private def widenTypes(plan: LogicalPlan, targetTypes: Seq[DataType]): LogicalPlan = {
405405
val casted = plan.output.zip(targetTypes).map {
406-
case (e, dt) if e.dataType != dt => Alias(Cast(e, dt), e.name)()
406+
case (e, dt) if e.dataType != dt =>
407+
Alias(Cast(e, dt, Some(SQLConf.get.sessionLocalTimeZone)), e.name)()
407408
case (e, _) => e
408409
}
409410
Project(casted, plan)

0 commit comments

Comments
 (0)