Skip to content

Commit

Permalink
In TextRebuildApp, table columns are zero-based, subtract 1 from the …
Browse files Browse the repository at this point in the history
…column count.

refs #24
  • Loading branch information
csjx committed Dec 9, 2021
1 parent d8d5444 commit e60a572
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static void main(String[] args) {
// Is the datetime column first or last?
int firstDateField = Integer.parseInt(config.getDateFields(0).get(0));
// Sort the table using the datetime field's corresponding index
int sortColumnIndex = firstDateField <= 1 ? 0 : mergedTable.columnCount();
int sortColumnIndex = firstDateField <= 1 ? 0 : mergedTable.columnCount() - 1;

// Deduplicate and sort rows of the merged table
sortedTable = deduplicateAndSortTable(mergedTable, sortColumnIndex);
Expand Down

0 comments on commit e60a572

Please sign in to comment.