Skip to content

Commit

Permalink
[HOPSWORKS-3235] Append avoid index out of range when reading the fea…
Browse files Browse the repository at this point in the history
…ture group (#713)

(cherry picked from commit ac15fc3)
  • Loading branch information
SirOibaf committed Jul 18, 2022
1 parent be54c36 commit 013f466
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/hsfs/feature_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,17 @@ def __init__(
self._partition_key = [
feat.name for feat in self._features if feat.partition is True
]
if time_travel_format is not None and time_travel_format.upper() == "HUDI":
if (
time_travel_format is not None
and time_travel_format.upper() == "HUDI"
and self._features
):
# hudi precombine key is always a single feature
self._hudi_precombine_key = [
feat.name
for feat in self._features
if feat.hudi_precombine_key is True
][0]
]
else:
self._hudi_precombine_key = None

Expand Down

0 comments on commit 013f466

Please sign in to comment.