You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,6 +332,9 @@
332
332
333
333
19. Ellipsis elements like `..1` are correctly excluded when searching for variables in "up-a-level" syntax inside `[`, [#5460](https://github.com/Rdatatable/data.table/issues/5460). Thanks @ggrothendieck for the report and @MichaelChirico for the fix.
334
334
335
+
20. `fread()` auto-detects separators for single-column files consisting solely of quoted values (e.g. `"this_that"\n"2025-01-01 00:00:01"`), [#7366](https://github.com/Rdatatable/data.table/issues/7366). Thanks @arunsrinivasan
336
+
for the report and @ben-schwen for the fix.
337
+
335
338
### NOTES
336
339
337
340
1. The following in-progress deprecations have proceeded:
Copy file name to clipboardExpand all lines: src/fread.c
+22-6Lines changed: 22 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1812,14 +1812,30 @@ int freadMain(freadMainArgs _args)
1812
1812
thisBlockStart=lineStart;
1813
1813
}
1814
1814
}
1815
-
if ((thisBlockLines>topNumLines&&lastncol>1) ||// more lines wins even with fewer fields, so long as number of fields >= 2
1816
-
(thisBlockLines==topNumLines&&
1817
-
lastncol>topNumFields&&// when number of lines is tied, choose the sep which separates it into more columns
1818
-
(quoteRule<QUOTE_RULE_EMBEDDED_QUOTES_NOT_ESCAPED||quoteRule <= topQuoteRule) &&// for test 1834 where every line contains a correctly quoted field contain sep
1819
-
(topNumFields <= 1||sep!=' '))) {
1815
+
boolblockHasQuote= false;
1816
+
if (quote&&lastncol==1) {
1817
+
for (constchar*scan=thisBlockStart; scan<ch; scan++) {
// same number of rows as current best but more fields (legacy tie-breaker)
1831
+
boolbetterTie= (thisBlockLines==topNumLines&&
1832
+
lastncol>topNumFields&&// when number of lines is tied, choose the sep which separates it into more columns
1833
+
(quoteRule<QUOTE_RULE_EMBEDDED_QUOTES_NOT_ESCAPED||quoteRule <= topQuoteRule) &&// for test 1834 where every line contains a correctly quoted field contain sep
0 commit comments