-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: add support for projecting JSON entities that have been composed on #31365
Labels
area-json
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-enhancement
Milestone
Comments
maumar
added a commit
that referenced
this issue
Aug 1, 2023
…have been composed on Adding new materialization path for JSON entities that have been converted to query roots - they look like normal entity, but materialization is somewhat different. We need to prune synthesized key properties from materializer code (as they are not associated with any column, but rather made up on the fly) Also added code to include all the child navigations. For normal entities we have IncludeExpressions in the shaper expression, but for JSON we prune all includes and build them in the materializer. Fix is to recognize the scenario (entity projection but the entity is mapped to JSON) during apply projection phase and generate all the necessary info needed rather than just dictionary of property to index maps like we do for regular entity. Then when we build materializer we use that info to prune the synthesized properties from key check and re-use existing include JSON entity code to add child navigations. Fixes #31365
maumar
added a commit
that referenced
this issue
Aug 2, 2023
…have been composed on Adding new materialization path for JSON entities that have been converted to query roots - they look like normal entity, but materialization is somewhat different. We need to prune synthesized key properties from materializer code (as they are not associated with any column, but rather made up on the fly) Also added code to include all the child navigations. For normal entities we have IncludeExpressions in the shaper expression, but for JSON we prune all includes and build them in the materializer. Fix is to recognize the scenario (entity projection but the entity is mapped to JSON) during apply projection phase and generate all the necessary info needed rather than just dictionary of property to index maps like we do for regular entity. Then when we build materializer we use that info to prune the synthesized properties from key check and re-use existing include JSON entity code to add child navigations. Fixes #31365
maumar
added a commit
that referenced
this issue
Aug 2, 2023
…have been composed on Adding new materialization path for JSON entities that have been converted to query roots - they look like normal entity, but materialization is somewhat different. We need to prune synthesized key properties from materializer code (as they are not associated with any column, but rather made up on the fly) Also added code to include all the child navigations. For normal entities we have IncludeExpressions in the shaper expression, but for JSON we prune all includes and build them in the materializer. Fix is to recognize the scenario (entity projection but the entity is mapped to JSON) during apply projection phase and generate all the necessary info needed rather than just dictionary of property to index maps like we do for regular entity. Then when we build materializer we use that info to prune the synthesized properties from key check and re-use existing include JSON entity code to add child navigations. Fixes #31365
maumar
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Aug 2, 2023
maumar
added a commit
that referenced
this issue
Aug 2, 2023
…have been composed on Adding new materialization path for JSON entities that have been converted to query roots - they look like normal entity, but materialization is somewhat different. We need to prune synthesized key properties from materializer code (as they are not associated with any column, but rather made up on the fly) Also added code to include all the child navigations. For normal entities we have IncludeExpressions in the shaper expression, but for JSON we prune all includes and build them in the materializer. Fix is to recognize the scenario (entity projection but the entity is mapped to JSON) during apply projection phase and generate all the necessary info needed rather than just dictionary of property to index maps like we do for regular entity. Then when we build materializer we use that info to prune the synthesized properties from key check and re-use existing include JSON entity code to add child navigations. Fixes #31365
maumar
added a commit
that referenced
this issue
Sep 5, 2023
…have been composed on Adding new materialization path for JSON entities that have been converted to query roots - they look like normal entity, but materialization is somewhat different. We need to prune synthesized key properties from materializer code (as they are not associated with any column, but rather made up on the fly) Also added code to include all the child navigations. For normal entities we have IncludeExpressions in the shaper expression, but for JSON we prune all includes and build them in the materializer. Fix is to recognize the scenario (entity projection but the entity is mapped to JSON) during apply projection phase and generate all the necessary info needed rather than just dictionary of property to index maps like we do for regular entity. Then when we build materializer we use that info to prune the synthesized properties from key check and re-use existing include JSON entity code to add child navigations. Fixes #31365
maumar
added a commit
that referenced
this issue
Sep 5, 2023
…have been composed on (#31391) Adding new materialization path for JSON entities that have been converted to query roots - they look like normal entity, but materialization is somewhat different. We need to prune synthesized key properties from materializer code (as they are not associated with any column, but rather made up on the fly) Also added code to include all the child navigations. For normal entities we have IncludeExpressions in the shaper expression, but for JSON we prune all includes and build them in the materializer. Fix is to recognize the scenario (entity projection but the entity is mapped to JSON) during apply projection phase and generate all the necessary info needed rather than just dictionary of property to index maps like we do for regular entity. Then when we build materializer we use that info to prune the synthesized properties from key check and re-use existing include JSON entity code to add child navigations. Fixes #31365
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-json
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-enhancement
We support projecting entities which own JSON entities, we also support projecting those entities directly accessed from the owner, as well indexing into individual elements.
However, when to-be-projected JSON entity was accessed via some query operation (e.g. filter, paging, etc) we convert the JSON column into query root using OPENJSON/json_each. This makes it so that the entity looks as if it was a normal entity to the materializer.
Normal entities go through different materialization codepath than JSON entities.
The text was updated successfully, but these errors were encountered: