Class StaticResultProvider
java.lang.Object
org.apache.flink.table.api.internal.StaticResultProvider
- All Implemented Interfaces:
ResultProvider
Create result provider from a static set of data using external types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.flink.table.utils.print.RowDataToStringConverterThis converter supports only String, long, int and boolean fields. -
Constructor Summary
ConstructorsConstructorDescriptionStaticResultProvider(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
Modifier and TypeMethodDescriptionorg.apache.flink.table.utils.print.RowDataToStringConverterbooleanReturn true if the first row is ready.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>Returns the select result as row iterator using external data types.org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData>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, waitMethods inherited from interface org.apache.flink.table.api.internal.ResultProvider
reset
-
Field Details
-
SIMPLE_ROW_DATA_TO_STRING_CONVERTER
public static final org.apache.flink.table.utils.print.RowDataToStringConverter SIMPLE_ROW_DATA_TO_STRING_CONVERTERThis converter supports only String, long, int and boolean fields. Moreover, this converter works only withGenericRowData.
-
-
Constructor Details
-
StaticResultProvider
-
StaticResultProvider
-
-
Method Details
-
setJobClient
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
-