Steps to reproduce:
1. Create a namespace, impersonating 'alice'
2. Create a stream in this namespace. It will be owned by 'alice', because the namespace is owned by 'alice'.
3. Attempt to create the stream again explicitly specifying 'alice'. It will fail due to the following check. It shouldn't fail though.
First of all, the error message is not clear. It only states the new owner principal, but not the existing owner principal. If we add that to the message, then it becomes clear that this case should be valid. How about two apps using the same stream, owned by same principal? It should not matter whether that principal comes form the namespace or the app, right?
Should this extend to the instance too? If we have impersonation enabled but no namespace owner configured should it allow creating at cdap?
Note to self: We need to do the same fix for dataset and apps.
why not. The point is that it needs to be the same owner, regardless of how that owner was determined.