@Override
    public RexNode visit(CallExpression call) {
        boolean isBatchMode = unwrapContext(relBuilder).isBatchMode();
        for (CallExpressionConvertRule rule : getFunctionConvertChain(isBatchMode)) {
            Optional<RexNode> converted = rule.convert(call, newFunctionContext());
            if (converted.isPresent()) {
                return converted.get();
            }
        }
        throw new RuntimeException("Unknown call expression: " + call);
    }
@Test
    void testIntervalYearMonth() {
        Period value = Period.of(999, 3, 1);
        RexNode rex = converter.visit(valueLiteral(value));
        assertThat(((RexLiteral) rex).getValueAs(BigDecimal.class))
                .isEqualTo(BigDecimal.valueOf(value.toTotalMonths()));
        // TODO planner ignores the precision
        assertThat(rex.getType().getSqlTypeName()).isEqualTo(SqlTypeName.INTERVAL_YEAR_MONTH);
        assertThat(rex.getType().getPrecision())
                .isEqualTo(2); // year precision, should actually be 3
    }