john-liu / jaql

Automatically exported from code.google.com/p/jaql
0 stars 0 forks source link

Improvements to the lines() function #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The lines() function provides support for reading in lines of text. But if
the lines of text are single columns and the user wants to convert it to a
specific atomic type, then s/he has to pipe the output of lines() to
convert(). lines() function should be designed along similar lines as del()
and take additional argument that can be used to specify the schema in case
the input file has single columns.

Additionally, write(lines()) should write text files where each data item
is converted to a single line of text. At present, write(lines()) behaves
similar to write(hdfs()) and generates sequence files.

Original issue reported on code.google.com by sudipt...@gmail.com on 16 Sep 2009 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by sudipt...@gmail.com on 17 Sep 2009 at 1:20

GoogleCodeExporter commented 9 years ago
This is from the commit log:

lines() function is now complete and can be used for both reading and writing.
For reading lines of text containing only a single column of data, it takes an
additional argument as {convert:schema} where one can specify the schema type,
and lines() will return an array of the specified type.

write(lines()) now produces a text file.

Added entry for lines() in storage-default.jql

Added tests for the new function.

Original comment by Rainer.G...@gmx.de on 17 Sep 2009 at 4:10