julianhyde commented on code in PR #3245: URL: https://github.com/apache/calcite/pull/3245#discussion_r1224877404
########## core/src/main/java/org/apache/calcite/sql/fun/SqlFloorFunction.java: ########## @@ -41,22 +45,23 @@ public class SqlFloorFunction extends SqlMonotonicUnaryFunction { //~ Constructors ----------------------------------------------------------- - public SqlFloorFunction(SqlKind kind) { - super(kind.name(), kind, ReturnTypes.ARG0_OR_EXACT_NO_SCALE, null, + public SqlFloorFunction(SqlKind kind, SqlReturnTypeInference returnTypeInference) { + super(kind.name(), kind, returnTypeInference, null, OperandTypes.NUMERIC_OR_INTERVAL.or( OperandTypes.sequence("'" + kind + "(<DATE> TO <TIME_UNIT>)'\n" + "'" + kind + "(<TIME> TO <TIME_UNIT>)'\n" + "'" + kind + "(<TIMESTAMP> TO <TIME_UNIT>)'", OperandTypes.DATETIME, OperandTypes.ANY)), SqlFunctionCategory.NUMERIC); - Preconditions.checkArgument(kind == SqlKind.FLOOR || kind == SqlKind.CEIL); + Preconditions.checkArgument(kind == SqlKind.FLOOR || kind == SqlKind.CEIL + || kind == SqlKind.FLOOR_BIG_QUERY || kind == SqlKind.CEIL_BIG_QUERY); } //~ Methods ---------------------------------------------------------------- @Override public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) { - // Monotonic iff its first argument is, but not strict. + // Monotonic if its first argument is, but not strict. Review Comment: yes it was intentional. When podcasters say "If you liked this episode, leave a review on Apple Music" I'm always jumping up and down, "You mean if and only if!" -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org