cloud-fan commented on a change in pull request #28420:
URL: https://github.com/apache/spark/pull/28420#discussion_r417825867
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -1206,7 +1207,7 @@ case class DatetimeSub(
interval: Expression,
child: Expression) extends RuntimeReplaceable {
override def toString: String = s"$start - $interval"
- override def sql: String = s"${start.sql} - ${interval.sql}"
+ override def sql: String = s"${toPrettySQL(start)} -
${toPrettySQL(interval)}"
Review comment:
This means `RuntimeReplaceable.sql` always use pretty sql, while other
expressions only use pretty sql when the caller side needs to (by calling
`toPrettySQL`).
Is it possible to make them consistent? Like make `start` and `interval` as
`innerChildren` and handle them in `usePrettyExpression`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]