From c601783e6fe0284181d24c31609a461c4c5f0a2c Mon Sep 17 00:00:00 2001 From: Fabio Buso Date: Wed, 13 Jul 2022 15:00:12 +0200 Subject: [PATCH] [HOPSWORKS-3235] Append avoid index out of range when reading the feature group (#713) --- python/hsfs/feature_group.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/hsfs/feature_group.py b/python/hsfs/feature_group.py index 63aa2b18d5..4cad97bd06 100644 --- a/python/hsfs/feature_group.py +++ b/python/hsfs/feature_group.py @@ -616,13 +616,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