iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::FileScanTask Class Reference

Task representing a data file and its corresponding delete files. More...

#include <table_scan.h>

Inheritance diagram for iceberg::FileScanTask:
iceberg::ScanTask

Public Member Functions

 FileScanTask (std::shared_ptr< DataFile > data_file, std::vector< std::shared_ptr< DataFile > > delete_files={}, std::shared_ptr< Expression > filter=nullptr)
 Construct with data file, delete files, and residual filter.
 
const std::shared_ptr< DataFile > & data_file () const
 The data file that should be read by this scan task.
 
const std::vector< std::shared_ptr< DataFile > > & delete_files () const
 Delete files that apply to this data file.
 
const std::shared_ptr< Expression > & residual_filter () const
 Residual filter to apply after reading.
 
Kind kind () const override
 The kind of scan task.
 
int64_t size_bytes () const override
 The number of bytes that should be read by this scan task.
 
int32_t files_count () const override
 The number of files that should be read by this scan task.
 
int64_t estimated_row_count () const override
 The number of rows that should be read by this scan task.
 
Result< ArrowArrayStreamToArrow (const std::shared_ptr< FileIO > &io, std::shared_ptr< Schema > projected_schema) const
 Returns a C-ABI compatible ArrowArrayStream to read the data for this task.
 

Additional Inherited Members

- Public Types inherited from iceberg::ScanTask
enum class  Kind : uint8_t { kFileScanTask , kChangelogScanTask }
 

Detailed Description

Task representing a data file and its corresponding delete files.

Constructor & Destructor Documentation

◆ FileScanTask()

iceberg::FileScanTask::FileScanTask ( std::shared_ptr< DataFile data_file,
std::vector< std::shared_ptr< DataFile > >  delete_files = {},
std::shared_ptr< Expression filter = nullptr 
)
explicit

Construct with data file, delete files, and residual filter.

Parameters
data_fileThe data file to read.
delete_filesDelete files that apply to this data file.
filterOptional residual filter to apply after reading.

Member Function Documentation

◆ estimated_row_count()

int64_t iceberg::FileScanTask::estimated_row_count ( ) const
overridevirtual

The number of rows that should be read by this scan task.

Implements iceberg::ScanTask.

◆ files_count()

int32_t iceberg::FileScanTask::files_count ( ) const
overridevirtual

The number of files that should be read by this scan task.

Implements iceberg::ScanTask.

◆ kind()

Kind iceberg::FileScanTask::kind ( ) const
inlineoverridevirtual

The kind of scan task.

Implements iceberg::ScanTask.

◆ size_bytes()

int64_t iceberg::FileScanTask::size_bytes ( ) const
overridevirtual

The number of bytes that should be read by this scan task.

Implements iceberg::ScanTask.

◆ ToArrow()

Result< ArrowArrayStream > iceberg::FileScanTask::ToArrow ( const std::shared_ptr< FileIO > &  io,
std::shared_ptr< Schema projected_schema 
) const

Returns a C-ABI compatible ArrowArrayStream to read the data for this task.

TODO(gangwu): move it to iceberg/data/task_scanner.h

Parameters
ioThe FileIO instance for accessing the file data.
projected_schemaThe projected schema for reading the data.
Returns
A Result containing an ArrowArrayStream, or an error on failure.

The documentation for this class was generated from the following files: