-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fread parse error #2708
fread parse error #2708
Conversation
88de0a7
to
bb36de9
Compare
@st-pasha I am unable to see the log of the failing builds, will you be able give a snippet of one of them? Thanks. |
Both test suits segfaulted when reading the file https://h2o-public-test-data.s3.amazonaws.com/fread/bad.txt |
The test itself is |
I checked out this branch and ran it on my wife's macOS. Versions All tests passed and reading the file bad.txt gave a 408x3 table.
any idea how to narrow down the bug? 🤔 |
@oleksiyskononenko You have told me before that you have a mac. My test suite is unfortunately failing on macOS in the cloud and I have no access to the logs either. As described above, I tested it locally on my wife's macbook and it passes. Whenever you have time, will you be able to build this branch and confirm whether the tests pass on your mac? I am kinda clueless how to proceed, any suggestions are useful. Thanks. |
@pradkrish I just checked it on my mac and it didn't segfault on |
Thanks @oleksiyskononenko, it seems to pass now. 😃 |
Hey. It's been a year. Any plans to merge this? @st-pasha |
@Darel13712 Need to fix the tests still |
@st-pasha seems all checks pass now? |
Closes #2680
At
src/core/read/fread/fread_thread_context.cc:210,
Ifj<ncols
and if*tch
reaches the end of line with the current quote rule, the while loop exits ending up in IOError.With the code added in this PR, one way to fix this is to decrement tch
(tch--)
to the previoussep
and try parsing again with the next quote rule. If the number of columns in the current row is only one, decrementing tch will never hit the sep in the current row and end up running into the previous row, hence theif
logic inside thewhile
loop to prevent this.