HyukjinKwon commented on a change in pull request #34883:
URL: https://github.com/apache/spark/pull/34883#discussion_r768258120



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -316,6 +316,15 @@ abstract class CastBase extends UnaryExpression with 
TimeZoneAwareExpression wit
   override lazy val resolved: Boolean =
     childrenResolved && checkInputDataTypes().isSuccess && (!needsTimeZone || 
timeZoneId.isDefined)
 
+  override lazy val roughlyCanonicalized: Expression = {

Review comment:
       Should we maybe consider having a separate trait for this?
   
   It looks to me that there are only specific expressions that can be 
optimized by roughly canonicalizing .. e.g.) we can have a trait, and call 
`roughlyCanonicalized` if it inherits the trait at `canonicalized`.




-- 
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]

Reply via email to