Record Class StreamingParallelParsingCoordinator.WarningSinks

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.StreamingParallelParsingCoordinator.WarningSinks
Record Components:
partialResultsWarningSink - receives a single client-visible message if a non-strict ErrorPolicy truncates the read at a max_record_size cap-hit — a genuine partial-results signal. Production passes AsyncExternalSourceBuffer.recordWarning(java.lang.String) so the operator can re-emit it on the driver thread (the segmentator runs on a forked worker whose response headers never reach the client — see #835).
informationalWarningSink - the unrelated, generic per-format relay (see FormatReadContext.informationalWarningSink()) for warnings a chunk's own reader raises while decoding (e.g. a malformed row skipped or a field null-filled) — these do not carry the same "fewer records than the source held" guarantee, so they must not be conflated with partialResultsWarningSink. Production passes AsyncExternalSourceBuffer.recordInformationalWarning(java.lang.String).
Enclosing class:
StreamingParallelParsingCoordinator

public static record StreamingParallelParsingCoordinator.WarningSinks(Consumer<String> partialResultsWarningSink, Consumer<String> informationalWarningSink) extends Record
Bundles the two independent, easily-confused warning relays a streaming parallel read may need to thread onto worker threads, as a single typed parameter — two bare adjacent Consumer<String> parameters/fields invite silent transposition at a call site.
  • Field Details

  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • partialResultsWarningSink

      @Nullable public Consumer<String> partialResultsWarningSink()
      Returns the value of the partialResultsWarningSink record component.
      Returns:
      the value of the partialResultsWarningSink record component
    • informationalWarningSink

      @Nullable public Consumer<String> informationalWarningSink()
      Returns the value of the informationalWarningSink record component.
      Returns:
      the value of the informationalWarningSink record component