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

Substract on non ordered streams produces incorrect result #339

Closed
nicolasjolet opened this issue Apr 24, 2022 · 2 comments
Closed

Substract on non ordered streams produces incorrect result #339

nicolasjolet opened this issue Apr 24, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nicolasjolet
Copy link

Hi again :-)

It seems that an issue is hidding in the Substract operator on non ordered streams.

Considering the following example:

var stream1 = contextStream
    .CrossApply("create values from enumeration", ctx => Enumerable.Range(1, 100)
        .Select(i => new { Id = i, Label = $"Label{i}" }));
var stream2 = contextStream
    .CrossApply("create values from enumeration2", ctx => Enumerable.Range(1, 8)
        .Select(i => new { Id = i, Label = $"OtherLabel{i}" }));
var res = stream1.Substract("merge with stream 2", stream2, i => i.Id, i => i.Id)
   .Do("print console", i => Console.WriteLine(i.Label));

The previous code produces only 1 row (Label100) instead of 92 rows.

No issue when using ordered streams and the method
public static IStream<TInLeft> Substract<TInLeft, TInRight, TKey>(this ISortedStream<TInLeft, TKey> leftStream, string name, ISortedStream<TInRight, TKey> rightStream).

(version 2.0.23)

@paillave paillave self-assigned this Apr 25, 2022
@paillave paillave added the bug Something isn't working label Apr 25, 2022
@paillave
Copy link
Owner

will look at it; I'll let U know.

paillave added a commit that referenced this issue May 6, 2022
bugs for subprocess & for unsorted substract #339
@paillave paillave closed this as completed Aug 9, 2022
@paillave
Copy link
Owner

paillave commented Aug 9, 2022

will look at it; I'll let U know.

@nicolasjolet A new version containing the fix is deployed since couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants