iceberg-cpp
Loading...
Searching...
No Matches
Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
iceberg::ScanTestBase Class Reference

Base class for scan-related tests providing common test utilities. More...

#include <scan_test_base.h>

Inheritance diagram for iceberg::ScanTestBase:
iceberg::IncrementalAppendScanTest iceberg::IncrementalChangelogScanTest iceberg::TableScanTest

Protected Member Functions

void SetUp () override
 
std::string MakeManifestPath ()
 Generate a unique manifest file path.
 
std::string MakeManifestListPath ()
 Generate a unique manifest list file path.
 
ManifestEntry MakeEntry (ManifestStatus status, int64_t snapshot_id, int64_t sequence_number, std::shared_ptr< DataFile > file)
 Create a manifest entry.
 
ManifestFile WriteDataManifest (int8_t format_version, int64_t snapshot_id, std::vector< ManifestEntry > entries, std::shared_ptr< PartitionSpec > spec=PartitionSpec::Unpartitioned())
 Write a data manifest file.
 
ManifestFile WriteDeleteManifest (int8_t format_version, int64_t snapshot_id, std::vector< ManifestEntry > entries, std::shared_ptr< PartitionSpec > spec)
 Write a delete manifest file.
 
std::string WriteManifestList (int8_t format_version, int64_t snapshot_id, int64_t parent_snapshot_id, int64_t sequence_number, const std::vector< ManifestFile > &manifests)
 Write a manifest list file.
 
std::shared_ptr< TableMetadataMakeTableMetadata (const std::vector< std::shared_ptr< Snapshot > > &snapshots, int64_t current_snapshot_id, const std::unordered_map< std::string, std::shared_ptr< SnapshotRef > > &refs={}, std::shared_ptr< PartitionSpec > default_spec=nullptr)
 Create table metadata with the given snapshots.
 
std::shared_ptr< DataFileMakeDataFile (const std::string &path, PartitionValues partition=PartitionValues(std::vector< Literal >{}), std::shared_ptr< PartitionSpec > spec=nullptr, int64_t record_count=1)
 Create a data file with optional partition values.
 
std::shared_ptr< SnapshotMakeAppendSnapshot (int8_t format_version, int64_t snapshot_id, std::optional< int64_t > parent_snapshot_id, int64_t sequence_number, const std::vector< std::string > &added_files, std::shared_ptr< PartitionSpec > spec=nullptr)
 Create an append snapshot with the given files (string paths).
 
std::shared_ptr< SnapshotMakeAppendSnapshotWithPartitionValues (int8_t format_version, int64_t snapshot_id, std::optional< int64_t > parent_snapshot_id, int64_t sequence_number, const std::vector< std::pair< std::string, PartitionValues > > &added_files, std::shared_ptr< PartitionSpec > spec=nullptr)
 Create an append snapshot with the given files (with partition values).
 
std::shared_ptr< SnapshotMakeDeleteSnapshot (int8_t format_version, int64_t snapshot_id, std::optional< int64_t > parent_snapshot_id, int64_t sequence_number, const std::vector< std::string > &deleted_files)
 Create a delete snapshot with the given files.
 
std::shared_ptr< SnapshotMakeDeleteSnapshot (int8_t format_version, int64_t snapshot_id, std::optional< int64_t > parent_snapshot_id, int64_t sequence_number, const std::vector< std::pair< std::string, PartitionValues > > &deleted_files)
 Create a delete snapshot with partition values for each file.
 
std::shared_ptr< SnapshotMakeOverwriteSnapshot (int8_t format_version, int64_t snapshot_id, std::optional< int64_t > parent_snapshot_id, int64_t sequence_number, const std::vector< std::string > &added_file_paths, const std::vector< std::string > &deleted_file_paths)
 Create an overwrite snapshot with added and deleted files.
 

Static Protected Member Functions

static std::vector< std::string > GetPaths (const std::vector< std::shared_ptr< FileScanTask > > &tasks)
 Extract file paths from scan tasks.
 

Protected Attributes

std::shared_ptr< FileIOfile_io_
 
std::shared_ptr< Schemaschema_
 
std::shared_ptr< PartitionSpecpartitioned_spec_
 
std::shared_ptr< PartitionSpecunpartitioned_spec_
 

Detailed Description

Base class for scan-related tests providing common test utilities.

This class provides common setup and helper functions for testing TableScan and IncrementalScan implementations.


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