Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3197

Make applying SelectSelectCombiningTransformer on expressions optional

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Linq
    • None

      In some cases when we are building dynamic expressions, it is possible to end up using multiple projections, for example:

       

      queryable.Select(i => new { A = i.Age }).Select(i => new { B = i.A})

      Applying SelectSelectCombiningTransformer make this LINQ to be combined and end up in NotSupportedException.

      I removed the transformer and there was no side effects, just two of tests were failed which excepted the exact query. 

      Here are name of the tests:

       

      Largest_and_smallest_cities_by_state
      Largest_and_smallest_cities_by_state_queryable_syntax
      

      If we could make usage of this transformer optional, it will cover more situations.

       

       

       

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            faridmehr.hesam@gmail.com Hesam Faridmehr
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: