MaxGekk commented on code in PR #40195:
URL: https://github.com/apache/spark/pull/40195#discussion_r1121416836
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -2758,15 +2758,13 @@ class AstBuilder extends
SqlBaseParserBaseVisitor[AnyRef] with SQLConfHelper wit
innerCtx.unitToUnitInterval)
}
visitMultiUnitsInterval(innerCtx.multiUnitsInterval)
- } else if (ctx.errorCapturingUnitToUnitInterval != null) {
+ } else {
val innerCtx = ctx.errorCapturingUnitToUnitInterval
if (innerCtx.error1 != null || innerCtx.error2 != null) {
val errorCtx = if (innerCtx.error1 != null) innerCtx.error1 else
innerCtx.error2
throw
QueryParsingErrors.moreThanOneFromToUnitInIntervalLiteralError(errorCtx)
}
visitUnitToUnitInterval(innerCtx.body)
- } else {
- throw QueryParsingErrors.invalidIntervalLiteralError(ctx)
Review Comment:
Is `invalidIntervalLiteralError` used somewhere else? If not, let's remove
it and the error class `_LEGACY_ERROR_TEMP_0025` from `error-classes.json`.
--
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]