@Internal public class StaticResultProvider extends Object implements ResultProvider
Modifier and Type | Field and 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 and Description |
---|
StaticResultProvider(List<org.apache.flink.types.Row> rows) |
StaticResultProvider(List<org.apache.flink.types.Row> rows,
java.util.function.Function<org.apache.flink.types.Row,org.apache.flink.table.data.RowData> externalToInternalConverter) |
Modifier and Type | Method and 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.
|
public static final org.apache.flink.table.utils.print.RowDataToStringConverter SIMPLE_ROW_DATA_TO_STRING_CONVERTER
GenericRowData
.public StaticResultProvider(List<org.apache.flink.types.Row> rows)
public StaticResultProvider(List<org.apache.flink.types.Row> rows, java.util.function.Function<org.apache.flink.types.Row,org.apache.flink.table.data.RowData> externalToInternalConverter)
public StaticResultProvider setJobClient(org.apache.flink.core.execution.JobClient jobClient)
ResultProvider
setJobClient
in interface ResultProvider
public org.apache.flink.util.CloseableIterator<org.apache.flink.table.data.RowData> toInternalIterator()
ResultProvider
ResultProvider.toExternalIterator()
.toInternalIterator
in interface ResultProvider
public org.apache.flink.util.CloseableIterator<org.apache.flink.types.Row> toExternalIterator()
ResultProvider
ResultProvider.toInternalIterator()
.toExternalIterator
in interface ResultProvider
public org.apache.flink.table.utils.print.RowDataToStringConverter getRowDataStringConverter()
getRowDataStringConverter
in interface ResultProvider
public boolean isFirstRowReady()
ResultProvider
The first row is ready when Iterator.hasNext()
method returns true or
Iterator.next()
method returns a row.
isFirstRowReady
in interface ResultProvider
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.