Query: fix edge cases around Cast/OfType result operator lifting #8334
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
There are some issues around result operator lifting, specifically Cast and OfType:
1.) cast used as type validation doesn't always throw when it should, e.g.:
when run on the client it will throw, because not every gear is an officer. However it works fine on sql sever, even though during QM optimization we turn this to:
2.) Before we try to lift cast, we handle OfType, by updating the type on EntityQueryable directly, e.g:
will get converted to:
This however breaks down if Cast is introduced to the mix:
will fail, because we process OfType first:
which then gets lifted to:
which is wrong
The text was updated successfully, but these errors were encountered: