public StateQueryRequest<R> withPartitions(final Set<Integer> partitions) {
        return new StateQueryRequest<>(
            storeName,
            position,
            Optional.of(Collections.unmodifiableSet(new HashSet<>(partitions))),
            query,
            executionInfoEnabled,
            requireActive
        );
    }
Specifies a set of partitions to run against. If some partitions are not locally available,
the response will contain a {@link FailureReason#NOT_PRESENT} for those partitions. If some
partitions in this set are not valid partitions for the store, the response will contain a
{@link FailureReason#DOES_NOT_EXIST} for those partitions.
streams/src/main/java/org/apache/kafka/streams/query/StateQueryRequest.java