Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Address flink review comments
Signed-off-by: Le Xuan An <anlx@viettel.com.vn>
  • Loading branch information
XuananLe authored and Le Xuan An committed Jun 6, 2026
commit 485c606ba9bec16c194d25f7aa68ef62c442e6cf
12 changes: 7 additions & 5 deletions docs/reference/compute-engine/flink.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ the configured online and/or offline store.

## Configuration

Install Feast with the Flink extra before using the engine:
Install the Flink extra from a Feast source checkout with `uv` before using the
engine:

```bash
python -m pip install 'feast[flink]'
uv sync --extra flink --no-dev
```

The `flink` extra installs PyFlink directly. Feast's Arrow dependency range is
kept compatible with PyFlink's supported `pyarrow` range so `feast[flink]`
resolves without a separate PyFlink install step.
The `flink` extra installs PyFlink directly. PyFlink currently requires
`pyarrow<21`, while the default Feast install keeps `pyarrow>=21`; Feast's uv
lock resolves the Flink extra in a separate dependency fork so normal Feast
installs do not downgrade Arrow.

Configure the engine in `feature_store.yaml`:

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ dependencies = [
"mmh3",
"numpy>=2.0.0,<3",
"pandas>=1.4.3,<3",
"pyarrow>=16.1.0",
"pyarrow>=21.0.0; extra != 'flink'",
"pyarrow>=16.1.0,<21.0.0; extra == 'flink'",
"pydantic>=2.10.6",
"pygments>=2.12.0,<3",
"PyYAML>=5.4.0,<7",
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/batch_feature_view.py
Comment thread
XuananLe marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def get_feature_transformation(self) -> Optional[Transformation]:
)
else:
raise ValueError(
f"Unsupported transformation mode: {self.mode} for StreamFeatureView"
f"Unsupported transformation mode: {self.mode} for BatchFeatureView"
)


Expand Down
5 changes: 3 additions & 2 deletions sdk/python/feast/infra/compute_engines/flink/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ def create_flink_table_environment(config: FlinkComputeEngineConfig) -> Any:
from pyflink.table import EnvironmentSettings, TableEnvironment
except ImportError as exc:
raise ImportError(
"FlinkComputeEngine requires PyFlink. Install Feast with the `flink` "
"extra or otherwise make the `pyflink` package available to Feast."
"FlinkComputeEngine requires PyFlink. Install the `flink` extra with "
"uv from a Feast source checkout, or otherwise make the `pyflink` "
"package available to Feast."
) from exc

flink_conf = Configuration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pandas as pd
import pyarrow as pa
import pytest
import toml # type: ignore[import-untyped]

from feast import BatchFeatureView, Entity, Field, FileSource
from feast.aggregation import Aggregation
Expand Down Expand Up @@ -45,6 +46,20 @@
from feast.value_type import ValueType


def test_flink_extra_does_not_downgrade_default_pyarrow_dependency() -> None:
pyproject_path = Path(__file__).resolve().parents[7] / "pyproject.toml"
pyproject = toml.loads(pyproject_path.read_text())

dependencies = pyproject["project"]["dependencies"]
assert "pyarrow>=21.0.0; extra != 'flink'" in dependencies
assert "pyarrow>=16.1.0,<21.0.0; extra == 'flink'" in dependencies
assert "pyarrow>=16.1.0" not in dependencies
assert (
"apache-flink>=2.2.1,<3"
in pyproject["project"]["optional-dependencies"]["flink"]
)


class FakeFlinkTable:
def __init__(self, df: pd.DataFrame) -> None:
self._df = df.copy()
Expand Down
Loading