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

[azure-search] Serialization fails due to Cannot map a recusive structure #18542

Merged
merged 6 commits into from
Nov 5, 2021

Conversation

sarangan12
Copy link
Contributor

This PR is to fix the issue reported at #15656. As discussed offline, we do not want to error out. Instead we can continue. I have also added the required test cases during the serialize/deserialize step.

@xirzec Please review and approve the PR.

@sarangan12 sarangan12 requested a review from xirzec November 4, 2021 21:26
@ghost ghost added the Search label Nov 4, 2021
Copy link
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

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

The code change looks good, some minor remarks on the test cases

{ id: "3", children: [child] }
];
const result = serialize(documents);
assert.deepEqual(documents, result);
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't this fail because the result shape is {hello: 'INF', world: '-INF', universe: 'NaN'} instead of the number value after serialization?

@sarangan12 sarangan12 merged commit 422a86c into Azure:main Nov 5, 2021
sadasant pushed a commit to sadasant/azure-sdk-for-js that referenced this pull request Nov 6, 2021
…ture (Azure#18542)

* Continue on a recursive structure walking

* Update Changelog

* Update sdk/search/search-documents/test/internal/serialization.spec.ts

Co-authored-by: Jeff Fisher <xirzec@xirzec.com>

* Update sdk/search/search-documents/test/internal/serialization.spec.ts

Co-authored-by: Jeff Fisher <xirzec@xirzec.com>

* Fix Typo

Co-authored-by: Jeff Fisher <xirzec@xirzec.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants