Skip to content

Commit

Permalink
Insist on terminating our CSV files with a line separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaudy committed Jun 12, 2024
1 parent e2a1b9d commit a5bf8fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ public static void writeCsv(Table[] sources, String destPath, boolean compressed
}

writeCsvHeader(out, fieldSeparator, columns);
out.write(System.lineSeparator());

for (Table source : sources) {
writeCsvContents(source, out, timeZone, null, nullsAsEmpty, fieldSeparator, columns);
Expand Down Expand Up @@ -647,6 +646,7 @@ public static void writeCsv(Table source, Writer out, ZoneId timeZone,

writeCsvHeader(out, separator, columns);
writeCsvContents(source, out, timeZone, progress, nullsAsEmpty, separator, columns);
out.write(System.lineSeparator());

out.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public void testWriteCsv() throws Exception {
parseZonedDateTime("2022-11-06T03:00:00.000000000 America/New_York")
},
new Boolean[] {
null, false, true, true, false, false, false, false, true, false, null, null, true
null, false, true, true, false, false, false, false, true, false, null, null, null
}
});
final String[] casts = {
Expand Down

0 comments on commit a5bf8fa

Please sign in to comment.