cloud-fan commented on a change in pull request #32949:
URL: https://github.com/apache/spark/pull/32949#discussion_r666885180
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -2452,9 +2491,16 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with
SQLConfHelper with Logg
} else {
values(i).getText
}
+
UTF8String.fromString(" " + v + " " + u)
}
- IntervalUtils.stringToInterval(UTF8String.concat(kvs: _*))
+ val intervalLiteral = UTF8String.concat(kvs: _*)
+ val calendarInterval = IntervalUtils.stringToInterval(intervalLiteral)
+ if (!conf.legacyIntervalEnabled && isYearMonthInterval &&
isDayTimeInterval) {
+ throw
QueryParsingErrors.mixedIntervalUnitsError(intervalLiteral.toString.trim, ctx)
Review comment:
I'm confused. Where do we build the literal string in `visitInterval `?
--
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]