Skip to content

Replace functionality of csv with streamly#32

Open
adithyaov wants to merge 2 commits intomasterfrom
rem-csv
Open

Replace functionality of csv with streamly#32
adithyaov wants to merge 2 commits intomasterfrom
rem-csv

Conversation

@adithyaov
Copy link
Copy Markdown
Member

No description provided.

@adithyaov adithyaov linked an issue Jan 27, 2022 that may be closed by this pull request
Comment thread lib/BenchShow/Common.hs

where

parseLine ls =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ls is confusing as it means lines, should be xs instead.

Comment thread lib/BenchShow/Common.hs
where

parseLine ls =
Stream.toList $ Stream.splitOn (== ',') Fold.toList $ Stream.fromList ls
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work with quoted fields that include escaped commas. We had frame parsing in streamly for that use case, but not sure if we have implemented it yet.

Comment thread lib/BenchShow/Common.hs

type CSV = [[String]]

-- XXX This is ugly in performance but works for the time being.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would that be the case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not truly streaming. I'm not using folds or parsers which I believe is more cleaner and the pipeline is more likely to fuse resulting in better performance.

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.

Remove dependency on csv package

2 participants