We're updating the issue view to help you get more done. 

UnionResultOperator should act as a query source for following query operators

Description

The UnionResultOperator currently pretends that it don't change the structure of the item sequence, passing through the incoming ItemExpression in its GetOutputDataInfo method. However, that's not correct, as the outgoing items may also come from a second source.

This manifests if Union is followed by an additional result operator. E.g.:

1 2 3 4 (from c in Cooks select c) .Union (OtherCooks) .Any (c2 => c2.IsFullTimeCook)

Currently, the AnyResultOperator's simplified predicate will reference the "c" from the MainFromClause. Which is wrong, since that specific item might also come from the OtherCooks collection. This should be changed so that the Any operator references the UnionResultOperator as a query source.

(IntersectResultOperator and ExceptResultOperator on the other hand should not be changed because they behave more like Take or Distinct, they are filtering the incoming sequence, so any outgoing item stems from that incoming sequence.)

Status

Assignee

Fabian Schmied

Reporter

Fabian Schmied

Labels

None

Time tracking

5h

Components

Fix versions

Priority

Normal
Configure