Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Separate families with explicitly defined columns from families without #2

@Lemmsjid

Description

@Lemmsjid

There's two ways of dealing with families in HPaste. First, you can define a family with strongly-typed columns inside of it. This is for a table-like scenario.

val myfam = family[String,String,Any]("myfam")
val mycolumn1 = column(myfam,"mycol1",classOf[Int])
val mycolumn2 = column(myfam,"mycol2",classOf[Int])

In that scenario, you typically access columns individually.

In the second scenario, you're dealing with the family as a map with dynamic keys and values.

val myfam = family[String,String,String]("myfam")

These two cases can walk over one another because the serializer is not polymorphic. In other words, you cannot treat a family with strongly typed columns as a Map, unless all of the columns and column keys have the same types.

We haven't had a use case where it's compelling to have polymorphic serialization, and there's plenty of scenarios where that is too complex, so we probably won't support it. So we should separate families into "tabular" families and "map" families. Or "dynamic" families.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions