yadavay-amzn commented on code in PR #56888:
URL: https://github.com/apache/spark/pull/56888#discussion_r3501104967
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:
##########
@@ -689,7 +689,11 @@ case class Cast(
override protected def withNewChildInternal(newChild: Expression): Cast =
copy(child = newChild)
- final override def nodePatternsInternal(): Seq[TreePattern] = Seq(CAST)
+ final override def nodePatternsInternal(): Seq[TreePattern] = dataType match
{
+ case _: TimestampNTZType | _: TimestampNTZNanosType |
Review Comment:
Added a comment above nodePatternsInternal recording both points: the
superset invariant w.r.t. ComputeCurrentTime / isTimeToTimestamp{NTZ,LTZ}, and
why we key on the target type only (node patterns are computed eagerly at
construction before the child is resolved). See bab3bfeef456.
--
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]