Similar to the bug reported in https://github.com/elastic/elasticsearch/issues/100186, it seems that stats over multiple indices where some might be missing the column generate errors:

    FROM logs-* | STATS count=count(*) BY agent.version

Results in:

    ValuesSources are mismatched

This happens in benchmarking tests where very little data is generated. The full benchmarks have all data generated, and the error does not occur, so we presume the issue might be either:

* A mismatch between documents created and index mappings
* Or missing data in indexes that do have this field mapped

The error trace is:

```
java.lang.IllegalStateException: ValuesSources are mismatched
	at org.elasticsearch.compute.operator.OrdinalsGroupingOperator.<init>(OrdinalsGroupingOperator.java:102)
	at org.elasticsearch.compute.operator.OrdinalsGroupingOperator.get(OrdinalsGroupingOperator.java:64)
	at org.elasticsearch.xpack.esql.planner.LocalExecutionPlanner.lambda-zsh(LocalExecutionPlanner.java:646)
	at java.base/java.util.stream.ReferencePipeline.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ForEachOps.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at org.elasticsearch.xpack.esql.planner.LocalExecutionPlanner.operators(LocalExecutionPlanner.java:646)
	at org.elasticsearch.xpack.esql.planner.LocalExecutionPlanner.apply(LocalExecutionPlanner.java:730)
	at org.elasticsearch.xpack.esql.planner.LocalExecutionPlanner.createDrivers(LocalExecutionPlanner.java:773)
	at org.elasticsearch.xpack.esql.plugin.ComputeService.runCompute(ComputeService.java:265)
	at org.elasticsearch.xpack.esql.plugin.ComputeService.lambda(ComputeService.java:432)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener.onResponse(ActionListener.java:177)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener.completeWith(ActionListener.java:305)
	at org.elasticsearch.xpack.esql.plugin.ComputeService.lambda(ComputeService.java:301)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.index.shard.IndexShard.ensureShardSearchActive(IndexShard.java:3932)
	at org.elasticsearch.xpack.esql.plugin.ComputeService.acquireSearchContexts(ComputeService.java:299)
	at org.elasticsearch.xpack.esql.plugin.ComputeService.messageReceived(ComputeService.java:430)
	at org.elasticsearch.xpack.esql.plugin.ComputeService.messageReceived(ComputeService.java:422)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.transport.TransportService.doRun(TransportService.java:1020)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext.doRun(ThreadContext.java:983)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext.doRun(ThreadContext.java:983)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)
```

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionIT.java
assertThat(results.columns().stream().map(ColumnInfo::type).toList(), contains("double", "long"));
            assertThat(getValuesList(results), containsInAnyOrder(List.of(42d, 1L), List.of(44d, 2L)));
        }
    }
    public void testFromEvalStats() {
        try (EsqlQueryResponse results = run("from test | eval ratio = data_d / count_d | stats avg(ratio)")) {
            logger.info(results);
            Assert.assertEquals(1, results.columns().size());
            Assert.assertEquals(1, getValuesList(results).size());
            assertEquals("avg(ratio)", results.columns().get(0).name());
            assertEquals("double", results.columns().get(0).type());
            assertEquals(1, getValuesList(results).get(0).size());
            assertEquals(0.034d, (double) getValuesList(results).get(0).get(0), 0.001d);
        }
    }
    public void testUngroupedCountAll() {
        try (EsqlQueryResponse results = run("from test | stats count(*)")) {
            logger.info(results);
            Assert.assertEquals(1, results.columns().size());
            Assert.assertEquals(1, getValuesList(results).size());
            assertEquals("count(*)", results.columns().get(0).name());
            assertEquals("long", results.columns().get(0).type());
            var values = getValuesList(results).get(0);
            assertEquals(1, values.size());
            assertEquals(40, (long) values.get(0));
        }
    }
    public void testUngroupedCountAllWithFilter() {
        try (EsqlQueryResponse results = run("from test | where data > 1 | stats count(*)")) {
            logger.info(results);