agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

Csv parse text with parens and commas #347

Closed YuMingLiao closed 1 year ago

YuMingLiao commented 2 years ago

allow csv TextAtom parser to accept parens and commas in order to accept descriptions like "abc(abc)" or "a, b, c"

agentm commented 2 years ago

Nice patch! Are there other corner cases which you anticipate could be fixed with this patch? Anything else missing?

Here's the test failure information:

test/Relation/Export/CSV.hs:98
re-import failed: AttributeMappingError (ParseError "capitalized data constructor letter: not enough input")
YuMingLiao commented 2 years ago

The parser should parse according to expected attributes. It seems now the code sees text without double quotes as data constructors. A wild guess is that the parser succeed at "Boston" in the first line and failed at Londonderry in the second line.

I'll take a look.