Class ResultSetImpl
- java.lang.Object
-
- org.apache.flink.table.gateway.api.results.ResultSetImpl
-
-
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, ResolvedSchema resultSchema, List<RowData> data, RowDataToStringConverter converter, boolean isQueryResult, JobID jobID, ResultKind resultKind)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
RowDataToStringConverter
getConverter()
List<RowData>
getData()
All the data in the current results.JobID
getJobID()
If the statement was submitted to a client, returns the JobID which uniquely identifies the job.Long
getNextToken()
The token indicates the next batch of the data.ResultKind
getResultKind()
Gets the result kind of the result.ResolvedSchema
getResultSchema()
The schema of the data.ResultSet.ResultType
getResultType()
Get the type of the results, which may indicate the result is EOS or has data.int
hashCode()
boolean
isQueryResult()
Indicates that whether the result is for a query.String
toString()
-
-
-
Constructor Detail
-
ResultSetImpl
public ResultSetImpl(ResultSet.ResultType resultType, @Nullable Long nextToken, ResolvedSchema resultSchema, List<RowData> data, RowDataToStringConverter converter, boolean isQueryResult, @Nullable JobID jobID, ResultKind resultKind)
-
-
Method Detail
-
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 interfaceResultSet
-
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 interfaceResultSet
-
getResultSchema
public 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 interfaceResultSet
-
getData
public List<RowData> getData()
Description copied from interface:ResultSet
All the data in the current results.
-
getConverter
public RowDataToStringConverter getConverter()
-
isQueryResult
public boolean isQueryResult()
Description copied from interface:ResultSet
Indicates that whether the result is for a query.- Specified by:
isQueryResult
in interfaceResultSet
-
getJobID
public 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.
-
getResultKind
public ResultKind getResultKind()
Description copied from interface:ResultSet
Gets the result kind of the result.- Specified by:
getResultKind
in interfaceResultSet
-
-