diff --git a/sdk/python/feast/infra/contrib/spark_kafka_processor.py b/sdk/python/feast/infra/contrib/spark_kafka_processor.py index 32d91b2010..ea55d89988 100644 --- a/sdk/python/feast/infra/contrib/spark_kafka_processor.py +++ b/sdk/python/feast/infra/contrib/spark_kafka_processor.py @@ -131,7 +131,7 @@ def batch_write(row: DataFrame, batch_id: int): # Also add a 'created' column. rows = ( rows.sort_values( - by=self.join_keys + [self.sfv.timestamp_field], ascending=True + by=[*self.join_keys, self.sfv.timestamp_field], ascending=False ) .groupby(self.join_keys) .nth(0)