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
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -344,6 +344,8 @@ See [#2611](https://github.com/Rdatatable/data.table/issues/2611) for details. T
344
344
345
345
22. `setDTthreads(percent=)` and `setDTthreads(threads=)` now respect `OMP_NUM_THREADS` and `omp_get_max_threads()`, ensuring consistency with `setDTthreads()` (no arguments) when OpenMP environment variables are set, [#7165](https://github.com/Rdatatable/data.table/issues/7165). Previously, explicitly setting a thread count or percentage would ignore these OpenMP limits, potentially exceeding the user'sintendedthreadcap.Thanksto@bastisticianforthereportand@ben-schwenforthefix.
346
346
347
+
23.`fread()`auto-detectsseparatorsforsingle-columnfilesconsistingsolelyofquoted values (e.g.`"this_that"\n"2025-01-01 00:00:01"`), [#7366](https://github.com/Rdatatable/data.table/issues/7366). Thanks @arunsrinivasan for the report and @ben-schwen for the fix.
Copy file name to clipboardExpand all lines: src/fread.c
+21-6Lines changed: 21 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1899,14 +1899,29 @@ int freadMain(freadMainArgs _args)
1899
1899
thisBlockStart=lineStart;
1900
1900
}
1901
1901
}
1902
-
if ((thisBlockLines>topNumLines&&lastncol>1) ||// more lines wins even with fewer fields, so long as number of fields >= 2
1903
-
(thisBlockLines==topNumLines&&
1904
-
lastncol>topNumFields&&// when number of lines is tied, choose the sep which separates it into more columns
1905
-
(quoteRule<QUOTE_RULE_EMBEDDED_QUOTES_NOT_ESCAPED||quoteRule <= topQuoteRule) &&// for test 1834 where every line contains a correctly quoted field contain sep
1906
-
(topNumFields <= 1||sep!=' '))) {
1902
+
boolblockHasQuote= false;
1903
+
if (quote&&lastncol==1) {
1904
+
for (constchar*scan=thisBlockStart; scan<ch; scan++) {
// more lines wins even with fewer fields, so long as number of fields >= 2
1917
+
boolbetterTie= (thisBlockLines==topNumLines&&
1918
+
lastncol>topNumFields&&// when number of lines is tied, choose the sep which separates it into more columns
1919
+
(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