Skip to content

.Net: Introduce a LINQ filter preprocessor in MEVD #11702

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

Open
wants to merge 1 commit into
base: feature-vector-data-preb2
Choose a base branch
from

Conversation

roji
Copy link
Member

@roji roji commented Apr 23, 2025

This is a refactor-only change, with no functional changes. It extracts out all logic for identifying and processing captured variables ("parameters") out to a new FilterTranslationProcessor connectos support type in MEVD.

  • Most databases don't support parameterization; for these we simply inline the captured variables. Connector translators see these as constants without ever having to know about captured variables etc.
  • SQL databases do support parameterization. For these, the preprocessor transforms the captured variable (which is a complex tree construct) into a simple QueryParameterExpression, which can easily be pattern-matched in connector translator code.

This is preparatory work for #11673 (we need a centralized place to do this kind of thing).

@roji roji requested a review from a team as a code owner April 23, 2025 22:09
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel memory labels Apr 23, 2025
@github-actions github-actions bot changed the title Introduce a LINQ filter preprocessor in MEVD .Net: Introduce a LINQ filter preprocessor in MEVD Apr 23, 2025
using System.Reflection;
using System.Runtime.CompilerServices;

namespace Microsoft.Extensions.VectorData.ConnectorSupport.Filter;
Copy link
Member

@dmytrostruk dmytrostruk Apr 24, 2025

Choose a reason for hiding this comment

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

I would keep everything related to connector support under single Microsoft.Extensions.VectorData.ConnectorSupport namespace to avoid namespace explosion and for better discoverability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel memory .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants