Can’t Have Same Stream on Both Sides of a cogroup

You can’t have the same stream on both sides of a cogroup operation. If you do, the code throws an error.
Important

Important

This change may break existing SAQL code. Update existing code to use this new behavior.

To perform a cogroup operation on the same dataset, you can load the dataset into two different streams.
a = load "0Fbxx000000002qCAA/0Fcxx000000002WCAQ";
b = load "0Fbxx000000002qCAA/0Fcxx000000002WCAQ";
b = cogroup a by ClosedDate, b by CreatedDate;
c = foreach b generate sum(a.Amount) as Amount;
You can also filter the dataset into two different streams:
a = load "0Fbxx000000002qCAA/0Fcxx000000002WCAQ";
a = filter a by "region" in ["West"];
a = filter a by "status" in ["closed"];
b = filter a by "year" in [2014];
c = filter a by "year" in [2015];
d = cogroup b by ("state"), c by ("state");
d = foreach d generate "state" as "state", sum(b.Amount) as "Amount_2014", sum(c.Amount) as "Amount_2015";
This code throws an error because it performs a cogroup operation on a single stream, a:
a = load "0Fbxx000000002qCAA/0Fcxx000000002WCAQ";
b = cogroup a by ClosedDate, a by CreatedDate;
c = foreach b generate sum(a.Amount) as Amount;