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.RowDataToStringConverterSIMPLE_ROW_DATA_TO_STRING_CONVERTERThis 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.RowDataToStringConvertergetRowDataStringConverter()booleanisFirstRowReady()Return true if the first row is ready.StaticResultProvidersetJobClient(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:ResultProviderSet the job client associated with the select job to retrieve the result.- Specified by:
setJobClientin interfaceResultProvider
-
toInternalIterator
public org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData> toInternalIterator()
Description copied from interface:ResultProviderReturns the select result as row iterator using internal data types. You must not invoke this method after invokingResultProvider.toExternalIterator().- Specified by:
toInternalIteratorin interfaceResultProvider
-
toExternalIterator
public org.apache.flink.util.CloseableIterator<org.apache.flink.types.Row> toExternalIterator()
Description copied from interface:ResultProviderReturns the select result as row iterator using external data types. You must not invoke this method after invokingResultProvider.toInternalIterator().- Specified by:
toExternalIteratorin interfaceResultProvider
-
getRowDataStringConverter
public org.apache.flink.table.utils.print.RowDataToStringConverter getRowDataStringConverter()
- Specified by:
getRowDataStringConverterin interfaceResultProvider
-
isFirstRowReady
public boolean isFirstRowReady()
Description copied from interface:ResultProviderReturn 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:
isFirstRowReadyin interfaceResultProvider
-
-