feat: Add apache flink compute engine#6476
Open
XuananLe wants to merge 2 commits into
Open
Conversation
Signed-off-by: Le Xuan An <anlx@viettel.com.vn>
Author
|
Can you review this PR and add any suggestions @cburroughs |
Signed-off-by: Le Xuan An <anlx@viettel.com.vn>
Author
|
Maintainer action needed per the Feast development guide: please add the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
flink.enginebatch engine andmode="flink"transformation mode.entity_df, pandasentity_df, strict native source retrieval, TTL interval rendering, and Flink-specific PyArrow dependency metadata.Feast has a pluggable compute engine abstraction, but does not currently include a Flink implementation. This PR adds a Flink/PyFlink backend so users can run Feast batch materialization and historical retrieval through Flink's Table API while preserving Feast's existing DAG execution model.
Which issue(s) this PR fixes
None filed.
Does this PR introduce a user-facing change
Yes.
Users can configure
batch_engine.type: flink.engineand usemode="flink"transformations onBatchFeatureView. Flink transformations receive and return PyFlink table objects. Source reads require offline-store retrieval jobs that exposeto_flink_table(table_env); Arrow/pandas-only retrieval jobs are rejected instead of silently falling back.The Flink extra must currently be installed with
uv sync --extra flink --no-devfrom a source checkout because PyFlink requirespyarrow<21, while default Feast installs keeppyarrow>=21.Release note
Testing
uv lockuv run ruff check sdk/python/feast/batch_feature_view.py sdk/python/feast/infra/compute_engines/flink sdk/python/feast/transformation/flink_transformation.py sdk/python/tests/unit/infra/compute_engines/flink/test_flink_compute_engine.pyuv run bash -c "cd sdk/python && mypy feast/batch_feature_view.py feast/infra/compute_engines/flink/compute.py feast/infra/compute_engines/flink/feature_builder.py feast/infra/compute_engines/flink/job.py feast/infra/compute_engines/flink/nodes.py feast/infra/compute_engines/flink/utils.py feast/transformation/flink_transformation.py tests/unit/infra/compute_engines/flink/test_flink_compute_engine.py --follow-imports=skip --check-untyped-defs"uv run python -m pytest sdk/python/tests/unit/infra/compute_engines/flink/test_flink_compute_engine.py -vuv sync --extra flink --no-devPYFLINK_NATIVE_SOURCE_SMOKE_OK pyarrow=16.1.0 pyflink=2.2.1Note:
pip install -e '.[flink]'cannot currently resolve the Flink extra because pip evaluates Feast's defaultpyarrow>=21requirement together with PyFlink'spyarrow<21requirement. The docs now point to the uv source-checkout install path that was verified above.