### Description

Only "search hits" based queries (no aggregations) provide a consistent view on the data when paginating through the result set. With point-in-time, it is possible to support transactional semantics for aggregation queries as well.

This issue is somewhat blocked by https://github.com/elastic/elasticsearch/issues/75528 because a PIT can not immediately be closed if the aggregation result set contains less than `fetch_size` records. This could cause some increased resource utilization due to open PITs. Especially if the client does not close the SQL cursor.
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/execution/search/Querier.java
}
            if (ref instanceof ScriptFieldRef f) {
                return new FieldHitExtractor(f.name(), null, cfg.zoneId(), multiValueFieldLeniency);
            }
            if (ref instanceof ComputedRef computedRef) {
                Pipe proc = computedRef.processor();
                
                Set<String> hitNames = new LinkedHashSet<>();
                proc = proc.transformDown(ReferenceInput.class, l -> {
                    HitExtractor he = createExtractor(l.context());
                    hitNames.add(he.hitName());
                    if (hitNames.size() > 1) {
                        throw new SqlIllegalArgumentException("Multi-level nested fields [{}] not supported yet", hitNames);
                    }
                    return new HitExtractorInput(l.source(), l.expression(), he);
                });
                String hitName = null;
                if (hitNames.size() == 1) {
                    hitName = hitNames.iterator().next();
                }
                return new ComputingExtractor(proc.asProcessor(), hitName);
            }
            throw new SqlIllegalArgumentException("Unexpected value reference {}", ref.getClass());
        }
    }
    /**
     * Base listener class providing clean-up and exception handling.
     * Handles both search hits and composite-aggs queries.
     */
    abstract static class BaseActionListener extends ActionListener.Delegating<SearchResponse, Page> {