Skip to main content

Module batch_size

Module batch_size 

Source
Expand description

Utilities for choosing an execution batch size from source statistics.

Constantsยง

TARGET_BATCH_BYTES ๐Ÿ”’
Approximate decoded bytes to produce in one batch.

Functionsยง

estimate_batch_size
Estimates a batch size from (num_rows, estimated_bytes) pairs.
estimate_row_width ๐Ÿ”’
Returns the ceiling of the estimated bytes per row.
row_group_statistics ๐Ÿ”’
Returns (num_rows, bytes) estimates of the row groups in a Parquet file: the uncompressed size of each row group, and one row of the largest decoded string and binary value bytes per row of the file (see max_row_value_width). Dictionary encoding can make the uncompressed size far smaller than the decoded values.
widest_row_group_statistic ๐Ÿ”’
Returns the statistic of row_group_statistics with the widest rows, which bounds the decoded size of a batch read from the file.