Skip to content

revert: remove MemoryExtensions.Contains handling from QueryConverter#82

Closed
korchak-aleksandr wants to merge 1 commit intomainfrom
korchak/revert-memory-extensions-contains
Closed

revert: remove MemoryExtensions.Contains handling from QueryConverter#82
korchak-aleksandr wants to merge 1 commit intomainfrom
korchak/revert-memory-extensions-contains

Conversation

@korchak-aleksandr
Copy link
Copy Markdown
Collaborator

What

Removes TryExtractArrayFromSpanExpression, FindArrayInClosure, and the MemoryExtensions.Contains branch in VisitMethodCall added in #76 and #80.

Also removes ArrayContainsTranslationTests.cs.

Why

Mindbox.Framework now normalizes MemoryExtensions.Contains(ReadOnlySpan<T>.op_Implicit(array), value)Enumerable.Contains(array, value) before expressions reach data-linq. This makes the QueryConverter logic dead code for our stack.

The normalization happens in MemoryExtensionsContainsNormalizer which runs inside QueryableExpander prior to ExpandExpressions().

Version bump

10.8.1 → 10.8.2

Mindbox.Framework now normalizes MemoryExtensions.Contains to
Enumerable.Contains before expressions reach data-linq, making
this dead code for our stack.
@korchak-aleksandr
Copy link
Copy Markdown
Collaborator Author

Closing: wrong direction. PR #81 (FindArrayInClosure display class fix) is the correct approach.

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.

1 participant