|
iceberg-cpp
|
Opens a FileScanTask as an ArrowArrayStream. More...
#include <file_scan_task_reader.h>
Classes | |
| struct | Options |
| Options shared by all tasks opened by this reader. More... | |
Public Member Functions | |
| Result< ArrowArrayStream > | Open (const FileScanTask &task) |
| Open a task and return an Arrow C stream for its projected live rows. | |
| FileScanTaskReader (const FileScanTaskReader &)=delete | |
| FileScanTaskReader & | operator= (const FileScanTaskReader &)=delete |
Static Public Member Functions | |
| static Result< std::unique_ptr< FileScanTaskReader > > | Make (Options options) |
| Create a reusable task reader from shared read context. | |
Opens a FileScanTask as an ArrowArrayStream.
FileScanTaskReader chooses the copy-on-write path for tasks without deletes and the merge-on-read path for tasks with v2 position or equality deletes. The returned stream exposes the fields of projected_schema with list widths determined by read.arrow.use-large-list, or fails if the reader cannot honor that setting. When apply_residuals is enabled, each task's residual filter is enforced after deletes and before final projection.
TODO(gangwu): Add a mode that emits a _deleted column instead of filtering rows.
| Result< ArrowArrayStream > iceberg::FileScanTaskReader::Open | ( | const FileScanTask & | task | ) |
Open a task and return an Arrow C stream for its projected live rows.
When Options::apply_residuals is set, Options::projected_schema must contain all fields referenced by the task's original residual. Missing references cause Open() to fail; they are not added from the table schema. Rows are filtered after deletes and before final projection.
Partial tasks are supported for Parquet, with each row group assigned to the half-open range containing its midpoint, as in Java Iceberg. Row positions and inherited row IDs remain relative to the whole file. Other formats require whole-file tasks. The task and its shared data/delete-file metadata must not be mutated while the stream uses them.