Skip to content

fread: preserve literal "NA" header names#7686

Open
shrektan wants to merge 1 commit intomasterfrom
fix-5124
Open

fread: preserve literal "NA" header names#7686
shrektan wants to merge 1 commit intomasterfrom
fix-5124

Conversation

@shrektan
Copy link
Copy Markdown
Member

Closes #5124

fread() currently reuses regular field NA parsing while reading header names, so a literal header value "NA" is treated as missing when na.strings includes "NA" and gets replaced with an auto-generated Vn name.

This patch makes header parsing preserve the literal column name while leaving normal data parsing unchanged.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.04%. Comparing base (9a8f664) to head (6b5cd8c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7686   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          87       87           
  Lines       17031    17037    +6     
=======================================
+ Hits        16868    16874    +6     
  Misses        163      163           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

No obvious timing issues in HEAD=fix-5124
Comparison Plot

Generated via commit 6b5cd8c

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 5 minutes and 22 seconds
Installing different package versions 11 minutes and 53 seconds
Running and plotting the test cases 4 minutes and 1 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSV header with column name "NA" is incorrectly parsed by fread

1 participant