Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pact API Proposal: Add keyless CoGroup (send all to a single group) #100

Open
andrehacker opened this issue Sep 14, 2013 · 2 comments
Open

Comments

@andrehacker
Copy link
Contributor

I propose to add a keyless version of CoGroup that groups both inputs in a single group, analogous to the keyless Reducer version that was added in #61

CoGroupContract myCoGroup = CoGroupContract.builder(MyUdf.class)
    .input1(contractA)
    .input2(contractB)
    .build();

I have a use case where I need to process the output of two contracts in a single udf and I currently have to use the workaround to add a constant field and use this as grouping key.

Adding a keyless version would reduce the overhead (network traffic, serialization and code-writing) and give the compiler additional knowledge (The compiler knows that there will be only a single group and a single udf call. If setAvgRecordsEmittedPerStubCall is set, it could infer the output cardinality)

Furthermore I think this would be consequent, because CoGroup is like Reduce for multiple inputs.

@rmetzger
Copy link
Member

We should implement this for the new Java API #463.

@StephanEwen
Copy link
Contributor

I am actually not too sure about that one. Keyless reducers are mostly only
valuable if they are combinable. What would be the use case for a key-less
cogroup?
Am 20.03.2014 17:25 schrieb "Robert Metzger" notifications@github.com:

We should implement this for the new Java API #463#463
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-38188477
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants