vladimirg-db commented on code in PR #50154: URL: https://github.com/apache/spark/pull/50154#discussion_r1980785955
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala: ########## @@ -2104,11 +2105,13 @@ case class ParseToDate( ansiEnabled: Boolean = SQLConf.get.ansiEnabled) extends RuntimeReplaceable with ImplicitCastInputTypes with TimeZoneAwareExpression { - override lazy val replacement: Expression = format.map { f => - Cast(GetTimestamp(left, f, TimestampType, "try_to_date", timeZoneId, ansiEnabled), DateType, - timeZoneId, EvalMode.fromBoolean(ansiEnabled)) - }.getOrElse(Cast(left, DateType, timeZoneId, - EvalMode.fromBoolean(ansiEnabled))) // backwards compatibility + override lazy val replacement: Expression = withOrigin(origin) { Review Comment: Are you proposing to replace all the `replacement` usages with a new method name? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org