@Override
    protected Function3<EntityColumnMapping, Object[], Map<String, Object>, Object> compile(String sql) {

        StringBuilder builder = new StringBuilder(sql.length());
        int argIndex = 0;
        for (int i = 0; i < sql.length(); i++) {
            char c = sql.charAt(i);
            if (c == '?') {
                builder.append("_arg").append(argIndex++);
            } else {
                builder.append(c);
            }
        }
        try {
            SpelExpressionParser parser = new SpelExpressionParser();

            Expression expression = parser.parseExpression(builder.toString());
            AtomicLong errorCount = new AtomicLong();

            return (mapping, args, object) -> {
                if (errorCount.get() > 1024) {
                    return null;
                }
                object = createArguments(mapping, object);

                if (args != null && args.length != 0) {
                    int index = 0;
                    for (Object parameter : args) {
                        object.put("_arg" + index, parameter);
                    }
                }
                StandardEvaluationContext context = SHARED_CONTEXT.get();
                try {
                    context.setRootObject(object);
                    Object val = expression.getValue(context);
                    errorCount.set(0);
                    return val;
                } catch (Throwable err) {
                    log.warn("invoke native sql [{}] value error",
                             sql,
                             err);
                    errorCount.incrementAndGet();
                } finally {
                    context.setRootObject(null);
                }
                return null;
            };
        } catch (Throwable error) {
            return spelError(sql, error);
        }
    }
@Test
    void testSnake() {
        SpelSqlExpressionInvoker invoker = new SpelSqlExpressionInvoker();
        EntityColumnMapping mapping = Mockito.mock(EntityColumnMapping.class);

        {
            Function3<EntityColumnMapping,Object[], Map<String, Object>, Object> func = invoker.compile("count_value + ?");

            assertEquals(12, func.apply(mapping,new Object[]{2}, Collections.singletonMap("countValue", 10)));

        }
        {
            Mockito.when(mapping.getPropertyByColumnName("_count_v"))
                   .thenReturn(java.util.Optional.of("countValue"));
            Function3<EntityColumnMapping,Object[], Map<String, Object>, Object> func = invoker.compile("_count_v + ?");

            assertEquals(12, func.apply(mapping,new Object[]{2}, Collections.singletonMap("countValue", 10)));

        }


    }