Skip to content

Commit 4364455

Browse files
committed
Bump Version 0.5.8
1 parent 2dad709 commit 4364455

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "superduper-framework"
77
description = "🔮 Bring AI to your favourite database 🔮"
88
readme = "README.md"
9-
version = '0.5.7'
9+
version = '0.5.8'
1010
license = {file = "LICENSE"}
1111
maintainers = [{name = "superduper.io, Inc.", email = "[email protected]"}]
1212
keywords = [

superduper/backends/query_dataset.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ def __init__(
6464
self._documents = list(
6565
self.db.execute(self.select.select_using_ids(ids))
6666
)
67+
primary_id = self.select.id_field
68+
# is it possible that the _documents came out in a different order?
69+
# if so, resort them
70+
lookup = {
71+
r[primary_id]: r for r in self._documents
72+
}
73+
self._documents = [lookup[id] for id in ids]
74+
# DONE
6775
else:
6876
if ids is None:
6977
self._ids = [

0 commit comments

Comments
 (0)