joelverhagen / NCsvPerf

A test bench for various .NET CSV parsing libraries
https://www.joelverhagen.com/blog/2020/12/fastest-net-csv-parsers
MIT License
69 stars 14 forks source link

Updated references. #43

Closed electricessence closed 2 years ago

joelverhagen commented 2 years ago

Looks like Open.Text.CSV 3.1.0 is producing different parse results leading to a unit test failure. Could you take a look?

electricessence commented 2 years ago

Looks like Open.Text.CSV 3.1.0 is producing different parse results leading to a unit test failure. Could you take a look? I'll look.

electricessence commented 2 years ago

@joelverhagen Current version is 3.2.0. Can try that instead?

electricessence commented 2 years ago

Ok hold on.. Lemme try this branch and see what's going on.

electricessence commented 2 years ago

@joelverhagen OK! I fixed that. Thank you for pointing it out. My tests were assuming a trailing comma is not needed which screwed everything up. The tests pass now except there's one issue with the Sylvan package that I tried to fix but it keeps throwing

Sylvan.Data.Csv.CsvMissingHeadersException : Exception of type 'Sylvan.Data.Csv.CsvMissingHeadersException' was thrown.

So I'm not sure about that. I would merge and contact @MarkPflug for a fix.

electricessence commented 2 years ago

@joelverhagen Ok nevermind the above. ALL FIXED! I had to trap the exception thrown by the Sylvan reader when it's constructed as it throws if there's empty data. @MarkPflug should consider not throwing if HasHeaders = false and there's no data. But I can understand if that's his expected behavior for his reader.

MarkPflug commented 2 years ago

@electricessence Thanks for bringing this to my attention. That behavior is not intended. I just pushed a fix in 1.1.10.

electricessence commented 2 years ago

@MarkPflug You're welcome! I just updated your reference and reverted the test implementation. This PR is ready to merge!

joelverhagen commented 2 years ago

Thanks @electricessence! I'll get this out on the blog soon after #45 comes in.