cloud-fan commented on a change in pull request #32922:
URL: https://github.com/apache/spark/pull/32922#discussion_r656727033
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -2514,8 +2514,13 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with
SQLConfHelper with Logg
}
override def visitYearMonthIntervalDataType(ctx:
YearMonthIntervalDataTypeContext): DataType = {
- // TODO(SPARK-35774): Parse any year-month interval types in SQL
- YearMonthIntervalType()
+ val start =
YearMonthIntervalType.stringToField(ctx.from.getText.toLowerCase(Locale.ROOT))
+ val end = if (ctx.to != null) {
+
YearMonthIntervalType.stringToField(ctx.to.getText.toLowerCase(Locale.ROOT))
Review comment:
shall we forbid `interval year to year`?
--
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]