agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

Enforce Isomorphic schema contraints #238

Open jmatsushita opened 5 years ago

jmatsushita commented 5 years ago

Hi there,

I have some time to look again at project-m36 and tried isomorphic schemas again launching off what I had tried in https://github.com/agentm/project-m36/issues/223#issuecomment-436585971 from the example.

I went a bit deeper and looked at the code for IsoRestrict. So the predicate for IsoRestrict actually doesn't do anything (yet?).

I also saw your issue https://github.com/agentm/project-m36/issues/55 and it seems that at the time, relExprMorph didn't return an Either. Now that it does, should the isomorphic schema constraints be enforced here?

agentm commented 5 years ago

Admittedly, I haven't touched the isomorphic schema code in a while, so I may be rusty in my understanding, but it is in place, so I expect it to work and there is test coverage.

I think that #55 is a corner case. Are you hitting this case in your testing?