Module org.elasticsearch.compute
Interface CapturingExternalSourceStatus
public interface CapturingExternalSourceStatus
Implemented by
Operator.Status subclasses that capture per-file source-metadata
contributions during data-node execution. The contributions are aggregated by
DriverCompletionInfo into the return-flow back to the coordinator so the coordinator can
enrich its SchemaCacheEntry for future queries.
The capture contract follows the well-known _stats.* flat-map key convention used by
esql's SourceStatisticsSerializer, so the coordinator's existing aggregation primitive
(SourceStatisticsSerializer.mergeStatistics) can merge across data nodes / chunks without
format-specific branching.
-
Method Summary
-
Method Details
-
capturedSourceMetadata
Per-file capture surface. Keyed by file path; the value is the list of flat_stats.*contributions from each iterator that touched the file — one per chunk for parallel parsing, one per split for macro-splits, one for whole-file reads.DriverCompletionInfo's factories collect these from every completed operator and concatenate per file path intoDriverCompletionInfo.capturedSourceMetadata. The per-path list is merged later by esql-side consumers (the compute module cannot reach the merge primitive). ReturningMap.of()when nothing was captured is fine. -
partial
default boolean partial()Whether this operator returned partial results because a lenient policy dropped data during the read (e.g. amax_record_sizetruncation under a non-stricterror_mode).DriverCompletionInfo's factories OR this across all completed operators so the coordinator can flip the response'sis_partialflag. Defaults tofalse; only operators that can lose data under a lenient policy override it.
-