@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 testLiteral() {
        RexNode rex = converter.visit(valueLiteral((byte) 1));
        assertThat((int) ((RexLiteral) rex).getValueAs(Integer.class)).isEqualTo(1);
        assertThat(rex.getType().getSqlTypeName()).isEqualTo(SqlTypeName.TINYINT);

        rex = converter.visit(valueLiteral((short) 1));
        assertThat((int) ((RexLiteral) rex).getValueAs(Integer.class)).isEqualTo(1);
        assertThat(rex.getType().getSqlTypeName()).isEqualTo(SqlTypeName.SMALLINT);

        rex = converter.visit(valueLiteral(1));
        assertThat((int) ((RexLiteral) rex).getValueAs(Integer.class)).isEqualTo(1);
        assertThat(rex.getType().getSqlTypeName()).isEqualTo(SqlTypeName.INTEGER);
    }