@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 testIntervalDayTime() {
        Duration value = Duration.ofDays(3).plusMillis(21);
        RexNode rex = converter.visit(valueLiteral(value));
        assertThat(((RexLiteral) rex).getValueAs(BigDecimal.class))
                .isEqualTo(BigDecimal.valueOf(value.toMillis()));
        assertThat(rex.getType().getSqlTypeName()).isEqualTo(SqlTypeName.INTERVAL_DAY_SECOND);
        // TODO planner ignores the precision
        assertThat(rex.getType().getPrecision())
                .isEqualTo(2); // day precision, should actually be 1
        assertThat(rex.getType().getScale())
                .isEqualTo(6); // fractional precision, should actually be 3
    }