Skip to content

Conversation

fsk119
Copy link
Member

@fsk119 fsk119 commented Sep 25, 2025

What is the purpose of the change

Add VECTOR_SEARCH connector API.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Sep 25, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

import java.io.Serializable;

/**
* A {@link DynamicTableSource} that search rows of an external storage system by one or more
Copy link
Contributor

Choose a reason for hiding this comment

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

nits:
search ->searches
during -> at

* lazily fetch individual values from a (possibly continuously changing) external table when
* necessary.
*
* <p>Note: Compared to {@link ScanTableSource}, a {@link VectorSearchTableSource} does only support
Copy link
Contributor

Choose a reason for hiding this comment

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

nits:
does only support -> only supports
I would remove the work currently.
I would remove "Further abilities are not supported." I think this is implied by the only word prior

* emitting insert-only changes currently (see also {@link RowKind}). Further abilities are not
* supported.
*
* <p>In the last step, the planner will call {@link #getSearchRuntimeProvider(VectorSearchContext)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it always the last step. It might be safer to ay after having ... then the planner will

* supported.
*
* <p>In the last step, the planner will call {@link #getSearchRuntimeProvider(VectorSearchContext)}
* for obtaining a provider of runtime implementation. The search fields that are required to
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
for obtaining a provider of runtime implementation -> to obtain the runtime implementation provider

* <p>In the last step, the planner will call {@link #getSearchRuntimeProvider(VectorSearchContext)}
* for obtaining a provider of runtime implementation. The search fields that are required to
* perform a search are derived from a query by the planner and will be provided in the given {@link
* VectorSearchTableSource.VectorSearchContext#getSearchColumns()}. The values for those key fields
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
those key fields -> the search fields

public interface VectorSearchTableSource extends DynamicTableSource {

/**
* Returns a provider of runtime implementation for reading the data.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
Returns a provider of runtime implementation for reading the data. -> Returns a SearchRuntimeProvider

/**
* Returns a provider of runtime implementation for reading the data.
*
* <p>There exist different interfaces for runtime implementation which is why {@link
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
VectorSearchRuntimeProvider is a base interface that should be extended (is this true) by child interfaces for specialized Vector Searches.

/**
* Context for creating runtime implementation via a {@link VectorSearchRuntimeProvider}.
*
* <p>It offers utilities by the planner for creating runtime implementation with minimal
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
by the planner for -> for the planner to

* <p>It offers utilities by the planner for creating runtime implementation with minimal
* dependencies to internal data structures.
*
* <p>Methods should be called in {@link #getSearchRuntimeProvider(VectorSearchContext)}.
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what "Methods should be called in " means. Maybe "classes needing access to the Vector search information should use {@link #getSearchRuntimeProvider(VectorSearchContext)}"

* dependencies to internal data structures.
*
* <p>Methods should be called in {@link #getSearchRuntimeProvider(VectorSearchContext)}.
* Returned instances that are {@link Serializable} can be directly passed into the runtime
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what the returned instances are here, the provider or what it provides?

int[][] getSearchColumns();

/**
* Runtime config provided to provider. The config can be used by planner or vector search
Copy link
Contributor

@davidradl davidradl Oct 3, 2025

Choose a reason for hiding this comment

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

nits:
provider -> the provider
planner -> the planner

/**
* Provides actual runtime implementation for reading the data.
*
* <p>There exist different interfaces for runtime implementation which is why {@link
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
exist -> exists

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.

3 participants