mihaibudiu commented on code in PR #4514:
URL: https://github.com/apache/calcite/pull/4514#discussion_r2315029437
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlTimestampAddFunction.java:
##########
@@ -129,8 +130,15 @@ static RelDataType deduceType(RelDataTypeFactory
typeFactory,
// with startUnit = EPOCH and timeFrameName = 'MINUTE15'.
//
// If the latter, check that timeFrameName is valid.
- validator.validateTimeFrame(
- (SqlIntervalQualifier) call.getOperandList().get(0));
+ SqlIntervalQualifier op0 = call.operand(0);
+ validator.validateTimeFrame(op0);
+ if (op0.timeFrameName == null
Review Comment:
well, the validator calls this method...
I find it nice that the logic is confined to the function that is being
checked.
--
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]