crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Wills (JIRA)" <>
Subject [jira] [Commented] (CRUNCH-239) Add support for unions of PTypes
Date Wed, 08 Jan 2014 05:58:51 GMT


Josh Wills commented on CRUNCH-239:

So I modeled UnionTuple after TupleN in the cogroup case; i.e., where we were writing a TupleN
that had at most one non-null value. TupleN.size() returns values.length (where values is
an Object[]), so that was how I came down there.

Re: Union implementing Tuple, that's more of an artifact of how I did the initial refactoring
than anything else; I don't know that there's any obvious upside to having Union implement
Tuple in the general case. I'm fine to drop that if you think it's cognitive overhead we don't
really need.

> Add support for unions of PTypes
> --------------------------------
>                 Key: CRUNCH-239
>                 URL:
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Josh Wills
>            Assignee: Josh Wills
>         Attachments: CRUNCH-239.patch
> There are a few core use cases (e.g., cogroups, as in CRUNCH-174) where it would be useful
to construct a union of multiple PTypes into a single PType, where any given observation could
only be of one of multiple/optional types.

This message was sent by Atlassian JIRA

View raw message