Skip to content

Commit

Permalink
Sort snapshot by create time in versions() result (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhou Fang authored Jan 17, 2024
1 parent b738461 commit cda6a83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/src/space/core/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,10 @@ def versions(self) -> pa.Table:
("tag_or_branch", pa.string()) # type: ignore[list-item]
]))

sort_args = [("create_time", "descending")]
return snapshot_id_table.join(ref_table,
keys=["snapshot_id"],
join_type="left outer")
join_type="left outer").sort_by(sort_args)

def ray_dataset(self, read_options: ReadOptions) -> ray.Dataset:
"""Return a Ray dataset for a Space storage."""
Expand Down

0 comments on commit cda6a83

Please sign in to comment.