Class VectorizedTableScanIterable
- java.lang.Object
-
- org.apache.iceberg.io.CloseableGroup
-
- org.apache.iceberg.arrow.vectorized.VectorizedTableScanIterable
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Iterable<ColumnarBatch>
,CloseableIterable<ColumnarBatch>
public class VectorizedTableScanIterable extends CloseableGroup implements CloseableIterable<ColumnarBatch>
A vectorized implementation of the Iceberg reader that iterates over the table scan. SeeArrowReader
for details.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.iceberg.io.CloseableIterable
CloseableIterable.ConcatCloseableIterable<E>
-
-
Constructor Summary
Constructors Constructor Description VectorizedTableScanIterable(TableScan scan)
Create a new instance using default values forbatchSize
andreuseContainers
.VectorizedTableScanIterable(TableScan scan, int batchSize, boolean reuseContainers)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close all the registered resources.CloseableIterator<ColumnarBatch>
iterator()
Returns an closeable iterator over elements of typeT
.-
Methods inherited from class org.apache.iceberg.io.CloseableGroup
addCloseable, addCloseable, setSuppressCloseFailure
-
-
-
-
Constructor Detail
-
VectorizedTableScanIterable
public VectorizedTableScanIterable(TableScan scan)
Create a new instance using default values forbatchSize
andreuseContainers
. ThebatchSize
is set toBATCH_SIZE_IN_NUM_ROWS
andreuseContainers
is set tofalse
.
-
VectorizedTableScanIterable
public VectorizedTableScanIterable(TableScan scan, int batchSize, boolean reuseContainers)
Create a new instance. SeeArrowReader(TableScan, int, boolean)
for details.
-
-
Method Detail
-
iterator
public CloseableIterator<ColumnarBatch> iterator()
Description copied from interface:CloseableIterable
Returns an closeable iterator over elements of typeT
.- Specified by:
iterator
in interfaceCloseableIterable<ColumnarBatch>
- Specified by:
iterator
in interfacejava.lang.Iterable<ColumnarBatch>
- Returns:
- an
CloseableIterator
.
-
close
public void close() throws java.io.IOException
Description copied from class:CloseableGroup
Close all the registered resources. Close method of each resource will only be called once. Checked exception from AutoCloseable will be wrapped to runtime exception.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classCloseableGroup
- Throws:
java.io.IOException
-
-