@Override
    public void apply(StringBuilder builder, Collection<String> params) {
        if (!hasParameter()) {
            builder.append(originalQuery);
            return;
        }

        Iterator<String> it = params == null ? Collections.emptyIterator() : params.iterator();
        for (QueryPart p : getParts()) {
            builder.append(p.part);
            builder.append(it.hasNext() ? it.next() : ClickHouseValues.NULL_EXPR);
        }

        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