Skip to content

Commit

Permalink
small simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
bubriks committed Dec 4, 2024
1 parent 24f65f0 commit 1618499
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions utils/python/hsfs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,7 @@ def offline_fg_materialization(

# update offsets
df_offsets = (df if limit > filtered_df.count() else filtered_df).groupBy("partition").agg(max("offset").alias("offset")).collect()
if offset_string == "earliest":
offset_dict = {entity._online_topic_name: {}}
else:
offset_dict = json.loads(offset_string)

offset_dict = json.loads(offset_string)
for offset_row in df_offsets:
offset_dict[entity._online_topic_name][f"{offset_row.partition}"] = (
offset_row.offset + 1
Expand Down

0 comments on commit 1618499

Please sign in to comment.