MaxGekk commented on a change in pull request #35502:
URL: https://github.com/apache/spark/pull/35502#discussion_r810812193
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -4510,4 +4510,15 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with
SQLConfHelper with Logg
private def alterViewTypeMismatchHint: Option[String] = Some("Please use
ALTER TABLE instead.")
private def alterTableTypeMismatchHint: Option[String] = Some("Please use
ALTER VIEW instead.")
+
+ /**
+ * Create a TimestampAdd expression.
+ */
+ override def visitTimestampadd(ctx: TimestampaddContext): Expression =
withOrigin(ctx) {
+ val arguments = Seq(
+ Literal(ctx.unit.getText),
Review comment:
This is not the single enter point for `timestampadd`, so, the **must**
word is not applicable. See the example above
https://github.com/apache/spark/pull/35502#discussion_r810112314, how it should
work if `the unit parameter **must** be foldable`. BTW, I will open an JIRA to
implement the optimization when `unit` is foldable.
--
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]