Interface ResultSet

All Known Implementing Classes:
ResultSetImpl

@PublicEvolving public interface ResultSet
A ResultSet represents the collection of the results. This interface defines the methods that can be used on the ResultSet.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Describe the kind of the result.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.apache.flink.table.data.RowData>
    All the data in the current results.
    org.apache.flink.api.common.JobID
    If the statement was submitted to a client, returns the JobID which uniquely identifies the job.
    The token indicates the next batch of the data.
    org.apache.flink.table.api.ResultKind
    Gets the result kind of the result.
    org.apache.flink.table.catalog.ResolvedSchema
    The schema of the data.
    Get the type of the results, which may indicate the result is EOS or has data.
    boolean
    Indicates that whether the result is for a query.
  • Method Details

    • getResultType

      ResultSet.ResultType getResultType()
      Get the type of the results, which may indicate the result is EOS or has data.
    • getNextToken

      @Nullable Long getNextToken()
      The token indicates the next batch of the data.

      When the token is null, it means all the data has been fetched.

    • getResultSchema

      org.apache.flink.table.catalog.ResolvedSchema getResultSchema()
      The schema of the data.

      The schema of the DDL, USE, EXPLAIN, SHOW and DESCRIBE align with the schema of the TableResult.getResolvedSchema(). The only differences is the schema of the `INSERT` statement.

      The schema of INSERT:

       +-------------+-------------+----------+
       | column name | column type | comments |
       +-------------+-------------+----------+
       |   job id    |    string   |          |
       +- -----------+-------------+----------+
       
    • getData

      List<org.apache.flink.table.data.RowData> getData()
      All the data in the current results.
    • isQueryResult

      boolean isQueryResult()
      Indicates that whether the result is for a query.
    • getJobID

      @Nullable org.apache.flink.api.common.JobID getJobID()
      If the statement was submitted to a client, returns the JobID which uniquely identifies the job. Otherwise, returns null.
    • getResultKind

      org.apache.flink.table.api.ResultKind getResultKind()
      Gets the result kind of the result.