build_statistics_record_batch

Function build_statistics_record_batch 

Source
fn build_statistics_record_batch<S: PruningStatistics + ?Sized>(
    statistics: &S,
    required_columns: &RequiredColumns,
) -> Result<RecordBatch>
Expand description

Build a RecordBatch from a list of statistics, creating arrays, with one row for each PruningStatistics and columns specified in the required_columns parameter.

For example, if the requested columns are

("s1", Min, Field:s1_min)
("s2", Max, field:s2_max)

And the input statistics had

S1(Min: 5, Max: 10)
S2(Min: 99, Max: 1000)
S3(Min: 1, Max: 2)

Then this function would build a record batch with 2 columns and one row s1_min and s2_max as follows (s3 is not requested):

s1_min | s2_max
-------+--------
  5    | 1000