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
BigArrays bigArrays
        ) throws IOException {
            boolean success = false;
            try {
                this.aggregators = aggregators;
                this.withOrdinals = withOrdinals;
                this.leafReaderContext = leafReaderContext;
                final SortedSetDocValues sortedSetDocValues = withOrdinals.ordinalsValues(leafReaderContext);
                this.currentReader = new BlockOrdinalsReader(sortedSetDocValues);
                this.visitedOrds = new BitArray(sortedSetDocValues.getValueCount(), bigArrays);
                success = true;
            } finally {
                if (success == false) {
                    close();
                }
            }
        }
        void addInput(IntVector docs, Page page) {
            try {
                GroupingAggregatorFunction.AddInput[] prepared = new GroupingAggregatorFunction.AddInput[aggregators.size()];
                for (int i = 0; i < prepared.length; i++) {
                    prepared[i] = aggregators.get(i).prepareProcessPage(this, page);
                }
                if (BlockOrdinalsReader.canReuse(currentReader, docs.getInt(0)) == false) {
                    currentReader = new BlockOrdinalsReader(withOrdinals.ordinalsValues(leafReaderContext));
                }
                final IntBlock ordinals = currentReader.readOrdinalsAdded1(docs);
                for (int p = 0; p < ordinals.getPositionCount(); p++) {
                    int start = ordinals.getFirstValueIndex(p);
                    int end = start + ordinals.getValueCount(p);