|
iceberg-cpp
|
Base class for scan-related tests providing common test utilities. More...
#include <scan_test_base.h>
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< TableMetadata > | MakeTableMetadata (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< DataFile > | MakeDataFile (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< Snapshot > | MakeAppendSnapshot (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< Snapshot > | MakeAppendSnapshotWithPartitionValues (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< Snapshot > | MakeDeleteSnapshot (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< Snapshot > | MakeDeleteSnapshot (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< Snapshot > | MakeOverwriteSnapshot (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< FileIO > | file_io_ |
| std::shared_ptr< Schema > | schema_ |
| std::shared_ptr< PartitionSpec > | partitioned_spec_ |
| std::shared_ptr< PartitionSpec > | unpartitioned_spec_ |
Base class for scan-related tests providing common test utilities.
This class provides common setup and helper functions for testing TableScan and IncrementalScan implementations.