Skip to main content

write_empty_output

Function write_empty_output 

Source
fn write_empty_output(
    var_count: i32,
    vars: Arc<BTreeMap<i32, ReadStatVarMetadata>>,
    schema: Arc<Schema>,
    wc: &WriteConfig,
    input_path: &Path,
) -> Result<(), ReadStatError>
Expand description

Writes a valid empty output file (header-only CSV, empty Parquet/Feather/ NDJSON) when the input contributed zero rows. Without this, a zero-row input would produce no output file at all despite a success exit code.