Pajaraja commented on code in PR #53428:
URL: https://github.com/apache/spark/pull/53428#discussion_r2607643945
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionBase.scala:
##########
@@ -262,7 +262,11 @@ abstract class TypeCoercionBase extends TypeCoercionHelper
{
case (attr, dt) =>
val widerType = findWiderTypeForTwo(attr.dataType, dt)
if (widerType.isDefined && widerType.get == dt) {
- Alias(Cast(attr, dt), attr.name)()
+ if (attr.dataType != dt) {
+ Alias(Cast(attr, dt, Some(conf.sessionLocalTimeZone)),
attr.name)()
Review Comment:
I added a test with time sensitive CAST in the golden file, but I think it's
okay either way since ResolveTimeZone is in the same batch as TypeCoercion.
I changed it here to have parity with how Union/Intersect/Except do it, but
it should be no-op.
##########
sql/core/src/test/resources/sql-tests/inputs/cte-recursion.sql:
##########
@@ -248,7 +248,6 @@ WITH
SELECT * FROM t1
)
SELECT * FROM t2;
-SET spark.sql.legacy.ctePrecedencePolicy=EXCEPTION;
Review Comment:
Reverted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]