Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Introduce client projections in SelectExpression #24675

Merged
1 commit merged into from
Apr 20, 2021
Merged

Query: Introduce client projections in SelectExpression #24675

1 commit merged into from
Apr 20, 2021

Commits on Apr 20, 2021

  1. Query: Introduce client projections in SelectExpression

    - ClientProjections is alternate when ProjectionMember binding is not possible using indexes
    - ClientProjections is separate from SelectExpression.Projection where former holds complex client side mapped projections and later holds only scalars
    - What it enables
      - Single result subquery is not joined right away
      - pendingCollections are removed
      - Ability to bind with above subquery translations after projection has converted to index based binding (enabling pending selector future change)
      - Ability to bind client projections smoothly like ProjectionMember binding so suppose translations post-client eval where it is supported
      - Grouping.FirstOrDefault can add subquery projection which applies separately so we can combine aggregate/non-aggregate projection on grouping
    - Introduce CollectionResultExpression which holds info on how to create collection for a subquery
    - ApplyProjection converts projectionMember/Index based bindings to actual scalar projection and updates shaper in same pass
    - Unique collectionId are assigned by shaper
    - Change in flow to projection to let sqlTranslator determines translatibility before processing for client side
    - Regression in collection over single result subquery
      - Earlier we applied single result right away copying over pending collection to outer which allowed single result subquery to convert apply to join
      - Now all client projections apply at same time so pending collection (equivalent subquery) is applied inside single result subquery so we fail to convert apply to join
    
    Ground work for #20291, #12088, #13805
    Resolves #23571
    smitpatel committed Apr 20, 2021
    Configuration menu
    Copy the full SHA
    3e07fd2 View commit details
    Browse the repository at this point in the history