LINQ translators should get lambda parameter serializers from context instead of deriving ad-hoc

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: LINQ
    • None
    • None
    • Dotnet Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      The existing (non-index) code paths in SelectMethodToAggregationExpressionTranslator, WhereMethodToAggregationExpressionTranslator, and SelectManyMethodToAggregationExpressionTranslator derive lambda parameter serializers ad-hoc using ArraySerializerHelper.GetItemSerializer(sourceTranslation.Serializer) instead of reading them from the known serializer map via context.GetSerializer(parameter).

      The SerializerFinder already populates these serializers (via DeduceItemAndCollectionSerializers), so the translators should use context.GetSerializer() to align with the architectural direction of having all serializer information come from the known serializer map.

      Affected code paths seen so far:

      • SelectMethodToAggregationExpressionTranslator (non-index Select): selectorParameter serializer
      • WhereMethodToAggregationExpressionTranslator (non-index Where): predicateParameter serializer
      • SelectManyMethodToAggregationExpressionTranslator (non-index SelectMany): selectorParameter serializer

      Found during CSHARP-5847 implementation.

            Assignee:
            Unassigned
            Reporter:
            Adelin Mbida Owona
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: