HashGroupingOperator has been updated to close inbound pages. Ordinals needs to do similar.
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/OrdinalsGroupingOperator.java
if (sources.get(i).source() instanceof ValuesSource.Bytes != bytesValues) {
                throw new IllegalStateException("ValuesSources are mismatched");
            }
        }
        this.sources = sources;
        this.docChannel = docChannel;
        this.groupingField = groupingField;
        this.aggregatorFactories = aggregatorFactories;
        this.ordinalAggregators = new HashMap<>();
        this.maxPageSize = maxPageSize;
        this.bigArrays = bigArrays;
        this.driverContext = driverContext;
    }
    @Override
    public boolean needsInput() {
        return finished == false;
    }
    @Override
    public void addInput(Page page) {
        checkState(needsInput(), "Operator is already finishing");
        requireNonNull(page, "page is null");
        DocVector docVector = page.<DocBlock>getBlock(docChannel).asVector();
        if (docVector.getPositionCount() == 0) {
            return;
        }
        final int shardIndex = docVector.shards().getInt(0);
        final var source = sources.get(shardIndex);
        if (docVector.singleSegmentNonDecreasing() && source.source() instanceof ValuesSource.Bytes.WithOrdinals withOrdinals) {
            final IntVector segmentIndexVector = docVector.segments();
            assert segmentIndexVector.isConstant();