Skip to content

Commit a6bbfda

Browse files
Ambient Code Botjyejare
authored andcommitted
Handle NotImplementedError for metadata property
Some RetrievalJob implementations don't implement the metadata property and raise NotImplementedError. Wrap metadata access in try-except to gracefully handle this case and maintain backward compatibility. Fixes CI test failure in test_retrieval_job_dataframe.py
1 parent 4edf660 commit a6bbfda

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

sdk/python/feast/infra/offline_stores/offline_store.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,13 @@ def to_arrow(
157157
# Build a mapping of ODFV name to requested feature names
158158
# This ensures we only return the features that were explicitly requested
159159
odfv_feature_refs = {}
160-
if self.metadata and self.metadata.features:
161-
for feature_ref in self.metadata.features:
160+
try:
161+
metadata = self.metadata
162+
except NotImplementedError:
163+
metadata = None
164+
165+
if metadata and metadata.features:
166+
for feature_ref in metadata.features:
162167
if ":" in feature_ref:
163168
view_name, feature_name = feature_ref.split(":", 1)
164169
# Check if this view_name matches any of the ODFVs

0 commit comments

Comments
 (0)