-
Notifications
You must be signed in to change notification settings - Fork 19
5.01 Architecture, notes, licence
CollSeq
is a wrapper around IndexedSeq[Product]
. CollSeq
also implements Product
itself.
CollSeqN
are concrete implementations of CollSeq
. They extend IndexedSeq[ProductN[T1,..,TN]]
and implement ProductN
. CollSeqN
has only one novel method: flatZip (s:Seq[A]): CollSeqN+1[T1,..TN,A]
CsvParser
is a simple Csv reader/parser.` There are concrete parsers implemented for each arity. The actual gruntwork is done by opencsv on the JVM and internal parser on JS. Opencsv will be removed once the internal parser is considered reliable and well tested.
Seq[Product1[T]] => CollSeq1[T]
Seq[Product2[T1,T2]] => CollSeq2[T1,T2]
Seq[T] => CollSeq1[T]
Stable.
In no particular order:
- How to incorporate classes that implement ProductN (future case classes)? This bug was originally milestoned for scala 2.11 but seems to have been pushed back a bit.
- Column access by named method (using macros?)
Non-goals:
- A mutable version
- Exceeding scala arity limits
CollSeq is known to scale to thousands of rows without difficulty. CollSeq is a thin wrapper around a scala IndexedSeq so should scala in exactly the same way. CsvParser's Iterator has been reported to process millions of rows without spiking the JVM's memory.
product-collections relies heavily on sbt-boilerplate. sbt-boilerplate is a cleverly designed yet simple code generating sbt-plugin.
Pull requests are welcome. Please keep in mind the KISS character if you extend the project. Feel free to discuss your ideas on the issue tracker.
Product-collections is around 400 lines of code (before template expansion). The alternatives are substantially larger and have far more features.
HLists are similar in concept. Shapeless allows one to abstract over arity.
Backed by arrays. Heavily specialized. Matrix operations.
Simple abstractions for working with ordered series data (eg. time series), as well as heterogeneous data tables (similar to R's data frame). Based on Spire and Shapeless.
With Framian you specify the data type at retrieval time (weakly typed).
Simple immutable data structure. Weakly typed. Quite a young project with emphasis on sorting.
The brilliance of [product-collections] is the tight focus on being really good at one or two things, which, in my opinion, includes not just the powerful type-safe column- and row-oriented operations, but the extensible use of implicit string converters...In product-collections you've hit the ultimate sweet-spot from an idiomatic Scala point of view."
Simeon H.K. Fitch, Director of Software Engineering, Elder Research, Inc.