CategoricalData / hydra

Transformations transformed
Apache License 2.0
72 stars 10 forks source link

Optionally generate Java classes as Serializable #97

Closed joshsh closed 1 year ago

joshsh commented 1 year ago

For the sake of Spark integration, certain generated classes may need be marked as Serializable. Hydra generates two kinds of top-level Java classes: type definition classes, and module interfaces. The former are the ones which would implement Serializable.

Not all type definitions can implement Serializable. For instance, any type expression with a function type as a subexpression cannot. The types which can implement Serializable should be identical to the ones which can be decoded to terms (see #47), and we face a similar choice: generate all eligible type definitions as Serializable, or selectively mark some type definitions with an annotation and generate only those (along with all of their dependencies) as Serializable.