Class ResultSetImpl

java.lang.Object
org.apache.flink.table.gateway.api.results.ResultSetImpl
All Implemented Interfaces:
ResultSet

@Internal public class ResultSetImpl extends Object implements ResultSet
An implementation of ResultSet.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.flink.table.gateway.api.results.ResultSet

    ResultSet.ResultType
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResultSetImpl(ResultSet.ResultType resultType, Long nextToken, org.apache.flink.table.catalog.ResolvedSchema resultSchema, List<org.apache.flink.table.data.RowData> data, org.apache.flink.table.utils.print.RowDataToStringConverter converter, boolean isQueryResult, org.apache.flink.api.common.JobID jobID, org.apache.flink.table.api.ResultKind resultKind)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.apache.flink.table.utils.print.RowDataToStringConverter
     
    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.
    int
     
    boolean
    Indicates that whether the result is for a query.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ResultSetImpl

      public ResultSetImpl(ResultSet.ResultType resultType, @Nullable Long nextToken, org.apache.flink.table.catalog.ResolvedSchema resultSchema, List<org.apache.flink.table.data.RowData> data, org.apache.flink.table.utils.print.RowDataToStringConverter converter, boolean isQueryResult, @Nullable org.apache.flink.api.common.JobID jobID, org.apache.flink.table.api.ResultKind resultKind)
  • Method Details

    • getResultType

      public ResultSet.ResultType getResultType()
      Description copied from interface: ResultSet
      Get the type of the results, which may indicate the result is EOS or has data.
      Specified by:
      getResultType in interface ResultSet
    • getNextToken

      @Nullable public Long getNextToken()
      Description copied from interface: ResultSet
      The token indicates the next batch of the data.

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

      Specified by:
      getNextToken in interface ResultSet
    • getResultSchema

      public org.apache.flink.table.catalog.ResolvedSchema getResultSchema()
      Description copied from interface: ResultSet
      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   |          |
       +- -----------+-------------+----------+
       
      Specified by:
      getResultSchema in interface ResultSet
    • getData

      public List<org.apache.flink.table.data.RowData> getData()
      Description copied from interface: ResultSet
      All the data in the current results.
      Specified by:
      getData in interface ResultSet
    • getConverter

      public org.apache.flink.table.utils.print.RowDataToStringConverter getConverter()
    • isQueryResult

      public boolean isQueryResult()
      Description copied from interface: ResultSet
      Indicates that whether the result is for a query.
      Specified by:
      isQueryResult in interface ResultSet
    • getJobID

      public org.apache.flink.api.common.JobID getJobID()
      Description copied from interface: ResultSet
      If the statement was submitted to a client, returns the JobID which uniquely identifies the job. Otherwise, returns null.
      Specified by:
      getJobID in interface ResultSet
    • getResultKind

      public org.apache.flink.table.api.ResultKind getResultKind()
      Description copied from interface: ResultSet
      Gets the result kind of the result.
      Specified by:
      getResultKind in interface ResultSet
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object