@Internal public class StaticResultProvider extends Object implements ResultProvider
Modifier and Type | Field and Description |
---|---|
static RowDataToStringConverter |
SIMPLE_ROW_DATA_TO_STRING_CONVERTER
This converter supports only String, long, int and boolean fields.
|
Constructor and Description |
---|
StaticResultProvider(List<Row> rows) |
StaticResultProvider(List<Row> rows,
java.util.function.Function<Row,RowData> externalToInternalConverter) |
Modifier and Type | Method and Description |
---|---|
RowDataToStringConverter |
getRowDataStringConverter() |
boolean |
isFirstRowReady()
Return true if the first row is ready.
|
StaticResultProvider |
setJobClient(JobClient jobClient)
Set the job client associated with the select job to retrieve the result.
|
CloseableIterator<Row> |
toExternalIterator()
Returns the select result as row iterator using external data types.
|
CloseableIterator<RowData> |
toInternalIterator()
Returns the select result as row iterator using internal data types.
|
public static final RowDataToStringConverter SIMPLE_ROW_DATA_TO_STRING_CONVERTER
GenericRowData
.public StaticResultProvider(List<Row> rows, java.util.function.Function<Row,RowData> externalToInternalConverter)
public StaticResultProvider setJobClient(JobClient jobClient)
ResultProvider
setJobClient
in interface ResultProvider
public CloseableIterator<RowData> toInternalIterator()
ResultProvider
ResultProvider.toExternalIterator()
.toInternalIterator
in interface ResultProvider
public CloseableIterator<Row> toExternalIterator()
ResultProvider
ResultProvider.toInternalIterator()
.toExternalIterator
in interface ResultProvider
public 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–2024 The Apache Software Foundation. All rights reserved.