presto-main/src/main/java/io/prestosql/operator/DistinctLimitOperator.java/DistinctLimitOperator/DistinctLimitOperator
class DistinctLimitOperator:    public DistinctLimitOperator(OperatorContext operatorContext, List<Integer> distinctChannels, List<Type> distinctTypes, long limit, Optional<Integer> hashChannel, JoinCompiler joinCompiler)
    {
        this.operatorContext = requireNonNull(operatorContext, "operatorContext is null");
        this.localUserMemoryContext = operatorContext.localUserMemoryContext();
        requireNonNull(distinctChannels, "distinctChannels is null");
        checkArgument(limit >= 0, "limit must be at least zero");
        requireNonNull(hashChannel, "hashChannel is null");

        outputChannels = ImmutableList.<Integer>builder()
                .addAll(distinctChannels)
                .addAll(hashChannel.map(ImmutableList::of).orElse(ImmutableList.of()))
                .build();

        this.groupByHash = createGroupByHash(
                distinctTypes,
                Ints.toArray(distinctChannels),
                hashChannel,
                Math.min((int) limit, 10_000),
                isDictionaryAggregationEnabled(operatorContext.getSession()),
                joinCompiler,
                this::updateMemoryReservation);
        remainingLimit = limit;
    }