pub struct TpchGeneratorBuilder { /* private fields */ }Expand description
Builder for constructing a TpchGenerator.
Implementations§
Source§impl TpchGeneratorBuilder
impl TpchGeneratorBuilder
Sourcepub fn scale_factor(&self) -> f64
pub fn scale_factor(&self) -> f64
Returns the scale factor.
Sourcepub fn with_scale_factor(self, scale_factor: f64) -> Self
pub fn with_scale_factor(self, scale_factor: f64) -> Self
Set the scale factor (e.g., 1.0 for 1GB, 10.0 for 10GB).
Sourcepub fn with_output_dir(self, output_dir: impl Into<PathBuf>) -> Self
pub fn with_output_dir(self, output_dir: impl Into<PathBuf>) -> Self
Set the output directory.
Sourcepub fn with_tables(self, tables: Vec<Table>) -> Self
pub fn with_tables(self, tables: Vec<Table>) -> Self
Set which tables to generate (default: all tables).
Sourcepub fn with_format(self, format: OutputFormat) -> Self
pub fn with_format(self, format: OutputFormat) -> Self
Set the output format (default: TBL).
Sourcepub fn with_num_threads(self, num_threads: usize) -> Self
pub fn with_num_threads(self, num_threads: usize) -> Self
Set the number of threads for parallel generation (default: number of CPUs).
Sourcepub fn with_parquet_compression(self, compression: Compression) -> Self
pub fn with_parquet_compression(self, compression: Compression) -> Self
Set Parquet compression format (default: SNAPPY).
Sourcepub fn with_parquet_row_group_bytes(self, bytes: i64) -> Self
pub fn with_parquet_row_group_bytes(self, bytes: i64) -> Self
Set target row group size in bytes for Parquet files (default: 7MB).
Sourcepub fn with_parts(self, parts: i32) -> Self
pub fn with_parts(self, parts: i32) -> Self
Set the number of partitions to generate.
Sourcepub fn with_part(self, part: i32) -> Self
pub fn with_part(self, part: i32) -> Self
Set the specific partition to generate (1-based, requires parts to be set).
Sourcepub fn with_stdout(self, stdout: bool) -> Self
pub fn with_stdout(self, stdout: bool) -> Self
Write output to stdout instead of files.
Sourcepub fn with_csv_delimiter(self, delimiter: char) -> Self
pub fn with_csv_delimiter(self, delimiter: char) -> Self
Set the CSV delimiter character (only applies to CSV format, default: ‘,’).
Sourcepub fn with_progress_tracker(self, tracker: Arc<dyn ProgressTracker>) -> Self
pub fn with_progress_tracker(self, tracker: Arc<dyn ProgressTracker>) -> Self
Attach a custom ProgressTracker to receive generation progress updates.
The runner calls ProgressTracker::finish on successful completion.
Trackers that need error or panic cleanup should use Drop as a
fallback. See crate::tpch_cli::progress for the full contract and examples.
Sourcepub fn build(self) -> TpchGenerator
pub fn build(self) -> TpchGenerator
Build the TpchGenerator with the configured settings.
Trait Implementations§
Source§impl Clone for TpchGeneratorBuilder
impl Clone for TpchGeneratorBuilder
Source§fn clone(&self) -> TpchGeneratorBuilder
fn clone(&self) -> TpchGeneratorBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more