Record Class SplitDiscoveryResult
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.SplitDiscoveryResult
Result of
SplitProvider.discoverSplits(org.elasticsearch.xpack.esql.datasources.spi.SplitDiscoveryContext): the discovered splits plus the post-prune
"scanned" accounting reported in the query profile.
filesScanned is the number of distinct files that survived coordinator-side pruning
and contributed at least one split. It is provider-specific: file-based sources report the real
count, while sources without a file concept (e.g. Arrow Flight) report 0. The other
scanned metrics surfaced in the profile — total split count and estimated bytes (sum of
ExternalSplit.estimatedSizeInBytes(), excluding splits that report an unknown size) —
are derived by SplitDiscoveryPhase from the splits() list, so they are not
carried here.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSplitDiscoveryResult(List<ExternalSplit> splits, int filesScanned) Creates an instance of aSplitDiscoveryResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefilesScannedrecord component.final inthashCode()Returns a hash code value for this object.static SplitDiscoveryResultof(List<ExternalSplit> splits) Convenience for providers that have no file-level accounting: carries the splits with afilesScannedof0.splits()Returns the value of thesplitsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
SplitDiscoveryResult
Creates an instance of aSplitDiscoveryResultrecord class.- Parameters:
splits- the value for thesplitsrecord componentfilesScanned- the value for thefilesScannedrecord component
-
-
Method Details
-
of
Convenience for providers that have no file-level accounting: carries the splits with afilesScannedof0. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
splits
Returns the value of thesplitsrecord component.- Returns:
- the value of the
splitsrecord component
-
filesScanned
public int filesScanned()Returns the value of thefilesScannedrecord component.- Returns:
- the value of the
filesScannedrecord component
-