Uploaded image for project: 're-motion'
  1. re-motion
  2. RM-4093

UnionResultOperator should act as a query source for following query operators

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.170
    • Component/s: Data.Linq
    • Labels:
      None

      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.:

      (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.)

        Attachments

        There are no Sub-Tasks for this issue.

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              fabian.schmied Fabian Schmied
              Reporter:
              fabian.schmied Fabian Schmied
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 hours
                5h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 15 minutes Time Not Required
                3h 15m