Skip to content

Commit

Permalink
Support TargetDestinationCount field for CSV and Arrow outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorang committed Nov 20, 2024
1 parent a4f1851 commit d2854df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parallel_odcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def _post_process_od_line_csvs(self):
# processing. Calculating the OD in chunks means our merged output may have more than k destinations for each
# origin because each individual chunk found the closest k for that chunk. We need to eliminate all extra rows
# beyond the first k. Sort the data by OriginOID and the Total_ field that was optimized for the analysis.
if self.num_destinations:
if self.num_destinations or self.df_dest_count is not None:
# Handle each origin range separately to avoid pulling all results into memory at once
for origin_range in self.origin_ranges:
csvs_for_origin_range = [
Expand Down Expand Up @@ -992,7 +992,7 @@ def _post_process_od_line_arrow_files(self):
# processing. Calculating the OD in chunks means our merged output may have more than k destinations for each
# origin because each individual chunk found the closest k for that chunk. We need to eliminate all extra rows
# beyond the first k. Sort the data by OriginOID and the Total_ field that was optimized for the analysis.
if self.num_destinations:
if self.num_destinations or self.df_dest_count is not None:
# Handle each origin range separately to avoid pulling all results into memory at once
for origin_range in self.origin_ranges:
files_for_origin_range = [
Expand Down

0 comments on commit d2854df

Please sign in to comment.