commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <>
Subject [jira] [Commented] (CSV-110) Add ability to parse single lines
Date Sun, 06 Apr 2014 13:03:16 GMT


Gary Gregory commented on CSV-110:

I played with some code in this area yesterday. I need to think about it more. It does not
need to be for 1.0 since the current patch is all new code that does not add to existing classes.
It feels like a layer on top.

> Add ability to parse single lines
> ---------------------------------
>                 Key: CSV-110
>                 URL:
>             Project: Commons CSV
>          Issue Type: New Feature
>            Reporter: Gabriel Reid
>         Attachments: CSV-110.patch
> Due to the iterator-based API of CSVParser, there is currently no simple and convenient
way to parse single lines of CSV-formatted data. The intention of this ticket is to add something
along the lines of the following:
> {code}
> CSVLineParser lineParser = new CSVLineParser(csvFormat);
> String singleLine = "a,b,c";
> CSVRecord singleRecord lineParser.parseLine(singleLine);
> {code}
> The use case of parsing single lines comes up very often in terms of distributed batch
processing scenarios (i.e. Hadoop jobs), and CSV-style formats are also regularly used in
such scenarios. Currently, projects are often forced to build their own ad-hoc CSV parsing
solutions, so adding the ability to parse single lines to commons-csv would be very useful
to these projects, as well as anyone doing parsing based on input that isn't necessary in
the form of a single stream.

This message was sent by Atlassian JIRA

View raw message