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

Json reader sandbox rebase #31076

Closed
wants to merge 1 commit into from
Closed

Json reader sandbox rebase #31076

wants to merge 1 commit into from

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Jun 13, 2023

very hacky, but most tests (apart from deduplication) work

@maumar maumar requested review from ajcvickers and removed request for ajcvickers June 13, 2023 19:30
@maumar
Copy link
Contributor Author

maumar commented Jun 13, 2023

@ajcvickers fyi

@maumar maumar force-pushed the json_reader_sandbox_rebase branch from edc51f8 to e0b0e8c Compare June 15, 2023 02:36
@maumar
Copy link
Contributor Author

maumar commented Jun 15, 2023

@ajcvickers pushed new version, updated to use your new json type mapping infra and did some clean up

@@ -318,6 +318,8 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery
shapedQueryExpression.ShaperExpression,
out var relationalCommandCache, out var readerColumns, out var relatedDataLoaders, ref collectionCount);

var foo = ExpressionPrinter.Print(shaper);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breakpoint here to see the see the final expression for debugging

}

shaperBlockExpressions.Add(entityShaperMaterializerVariable);
var rewrittenEntityShaperMaterializer = new JsonEntityMaterializerRewriter2(
Copy link
Contributor Author

@maumar maumar Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breakpoint here to see the shaper before (i.e. regular entity materializer with random access to the properties in the reader/JSON DOM) and after (basic streaming structure, but without JSON property reads yet - still all in terms of ValueBuffers). Still doesn't handle the tracking scenario (where we already have entity in state manager but need to read/skip through json stream rather than return instantly.

{
var (jsonElementParameter, keyPropertyValuesParameter) = _jsonMaterializationContextParameterMapping[mappingParameter];
var (jsonReaderDataParameter, keyPropertyValuesParameter) = _jsonMaterializationContextToJsonReaderDataAndKeyValuesParameterMapping[mappingParameter];
Copy link
Contributor Author

@maumar maumar Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is where we actually convert from ValueBuffer based dummy property access to actual JsonReaderWriter stuff (inside CreateReadJsonPropertyValueExpression). Seems to be working fine, but idk about AOT

@maumar maumar force-pushed the json_reader_sandbox_rebase branch from e0b0e8c to 9a672b6 Compare June 15, 2023 02:46
@maumar maumar closed this Jun 30, 2023
@maumar maumar deleted the json_reader_sandbox_rebase branch October 4, 2023 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant