@Override
    public void apply(StringBuilder builder, String[] values) {
        if (!hasParameter()) {
            builder.append(originalQuery);
            return;
        }

        int len = values == null ? 0 : values.length;
        int index = 0;
        for (QueryPart p : getParts()) {
            builder.append(p.part);
            builder.append(index < len ? values[index] : ClickHouseValues.NULL_EXPR); // NOSONAR
            index++;
        }

        appendLastPartIfExists(builder);
    }
Creates an instance by parsing the given query.

@param config non-null configuration
@param query  non-empty SQL query
@return parameterized query
clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/JdbcParameterizedQuery.java