Class StaticResultProvider
- java.lang.Object
-
- org.apache.flink.table.api.internal.StaticResultProvider
-
- All Implemented Interfaces:
ResultProvider
@Internal public class StaticResultProvider extends Object implements ResultProvider
Create result provider from a static set of data using external types.
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.flink.table.utils.print.RowDataToStringConverter
SIMPLE_ROW_DATA_TO_STRING_CONVERTER
This converter supports only String, long, int and boolean fields.
-
Constructor Summary
Constructors Constructor Description StaticResultProvider(List<org.apache.flink.types.Row> rows)
StaticResultProvider(List<org.apache.flink.types.Row> rows, Function<org.apache.flink.types.Row,org.apache.flink.table.data.RowData> externalToInternalConverter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.table.utils.print.RowDataToStringConverter
getRowDataStringConverter()
boolean
isFirstRowReady()
Return true if the first row is ready.StaticResultProvider
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>
toExternalIterator()
Returns the select result as row iterator using external data types.org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData>
toInternalIterator()
Returns the select result as row iterator using internal data types.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.api.internal.ResultProvider
reset
-
-
-
-
Method Detail
-
setJobClient
public StaticResultProvider setJobClient(org.apache.flink.core.execution.JobClient jobClient)
Description copied from interface:ResultProvider
Set the job client associated with the select job to retrieve the result.- Specified by:
setJobClient
in interfaceResultProvider
-
toInternalIterator
public org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData> toInternalIterator()
Description copied from interface:ResultProvider
Returns the select result as row iterator using internal data types. You must not invoke this method after invokingResultProvider.toExternalIterator()
.- Specified by:
toInternalIterator
in interfaceResultProvider
-
toExternalIterator
public org.apache.flink.util.CloseableIterator<org.apache.flink.types.Row> toExternalIterator()
Description copied from interface:ResultProvider
Returns the select result as row iterator using external data types. You must not invoke this method after invokingResultProvider.toInternalIterator()
.- Specified by:
toExternalIterator
in interfaceResultProvider
-
getRowDataStringConverter
public org.apache.flink.table.utils.print.RowDataToStringConverter getRowDataStringConverter()
- Specified by:
getRowDataStringConverter
in interfaceResultProvider
-
isFirstRowReady
public boolean isFirstRowReady()
Description copied from interface:ResultProvider
Return true if the first row is ready.The first row is ready when
Iterator.hasNext()
method returns true orIterator.next()
method returns a row.- Specified by:
isFirstRowReady
in interfaceResultProvider
-
-