Skip to content

Commit

Permalink
Fixed a bug in CSV parsing exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftp committed Feb 7, 2018
1 parent 35c7202 commit 07573a9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ public DataFrame load() throws Exception {
stringColumns[stringColNum++].add(rowValue);
} else if (t == Schema.ColType.DOUBLE) {
try {
doubleColumns[doubleColNum++].add(Double.parseDouble(rowValue));
doubleColumns[doubleColNum].add(Double.parseDouble(rowValue));
} catch (NumberFormatException e) {
doubleColumns[doubleColNum++].add(Double.NaN);
doubleColumns[doubleColNum].add(Double.NaN);
}
doubleColNum++;
} else {
throw new RuntimeException("Bad ColType");
}
Expand Down

0 comments on commit 07573a9

Please sign in to comment.