Interface ResultProvider

All Known Implementing Classes:
StaticResultProvider

@Internal public interface ResultProvider
An internal class which helps the client to get the execute result from a specific sink.

The two iterators are exclusive, that is you can use only one of the two at the same time.

This class is generated by specific sink and brings the result info to a TableResult.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.table.utils.print.RowDataToStringConverter
     
    boolean
    Return true if the first row is ready.
    default void
    Reset this ResultProvider to the origin state when we create it.
    setJobClient(org.apache.flink.core.execution.JobClient jobClient)
    Set the job client associated with the select job to retrieve the result.
    org.apache.flink.util.CloseableIterator<org.apache.flink.types.Row>
    Returns the select result as row iterator using external data types.
    org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData>
    Returns the select result as row iterator using internal data types.
  • Method Details

    • setJobClient

      ResultProvider setJobClient(org.apache.flink.core.execution.JobClient jobClient)
      Set the job client associated with the select job to retrieve the result.
    • toInternalIterator

      org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData> toInternalIterator()
      Returns the select result as row iterator using internal data types. You must not invoke this method after invoking toExternalIterator().
    • toExternalIterator

      org.apache.flink.util.CloseableIterator<org.apache.flink.types.Row> toExternalIterator()
      Returns the select result as row iterator using external data types. You must not invoke this method after invoking toInternalIterator().
    • getRowDataStringConverter

      org.apache.flink.table.utils.print.RowDataToStringConverter getRowDataStringConverter()
    • isFirstRowReady

      boolean isFirstRowReady()
      Return true if the first row is ready.

      The first row is ready when Iterator.hasNext() method returns true or Iterator.next() method returns a row.

    • reset

      default void reset()
      Reset this ResultProvider to the origin state when we create it.