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, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)org.apache.flink.table.utils.print.RowDataToStringConvertergetConverter()List<org.apache.flink.table.data.RowData>getData()All the data in the current results.org.apache.flink.api.common.JobIDgetJobID()If the statement was submitted to a client, returns the JobID which uniquely identifies the job.LonggetNextToken()The token indicates the next batch of the data.org.apache.flink.table.api.ResultKindgetResultKind()Gets the result kind of the result.org.apache.flink.table.catalog.ResolvedSchemagetResultSchema()The schema of the data.ResultSet.ResultTypegetResultType()Get the type of the results, which may indicate the result is EOS or has data.inthashCode()booleanisQueryResult()Indicates that whether the result is for a query.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
getResultType
public ResultSet.ResultType getResultType()
Description copied from interface:ResultSetGet the type of the results, which may indicate the result is EOS or has data.- Specified by:
getResultTypein interfaceResultSet
-
getNextToken
@Nullable public Long getNextToken()
Description copied from interface:ResultSetThe token indicates the next batch of the data.When the token is null, it means all the data has been fetched.
- Specified by:
getNextTokenin interfaceResultSet
-
getResultSchema
public org.apache.flink.table.catalog.ResolvedSchema getResultSchema()
Description copied from interface:ResultSetThe 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:
getResultSchemain interfaceResultSet
-
getData
public List<org.apache.flink.table.data.RowData> getData()
Description copied from interface:ResultSetAll the data in the current results.
-
getConverter
public org.apache.flink.table.utils.print.RowDataToStringConverter getConverter()
-
isQueryResult
public boolean isQueryResult()
Description copied from interface:ResultSetIndicates that whether the result is for a query.- Specified by:
isQueryResultin interfaceResultSet
-
getJobID
public org.apache.flink.api.common.JobID getJobID()
Description copied from interface:ResultSetIf the statement was submitted to a client, returns the JobID which uniquely identifies the job. Otherwise, returns null.
-
getResultKind
public org.apache.flink.table.api.ResultKind getResultKind()
Description copied from interface:ResultSetGets the result kind of the result.- Specified by:
getResultKindin interfaceResultSet
-
-