fn write_batch_csv( run_dir: &Path, batch: &CsvRecords, written_tables: &mut HashSet<String>, full_headers_by_table: &HashMap<String, Vec<String>>, ) -> Result<()>