Skip to content

Commit fd8ced6

Browse files
[BUG] Fix failing fork on empty collection (chroma-core#4366)
1 parent 8844207 commit fd8ced6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

go/pkg/log/store/db/queries.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/pkg/log/store/queries/queries.sql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ FROM record_log r
4646
WHERE r.collection_id = $1;
4747

4848
-- name: GetBoundsForCollection :one
49-
SELECT
50-
COALESCE(record_compaction_offset_position, 0) AS record_compaction_offset_position,
51-
COALESCE(record_enumeration_offset_position, 0) AS record_enumeration_offset_position
49+
SELECT CAST(COALESCE(MIN(record_compaction_offset_position), 0) as bigint) AS record_compaction_offset_position, CAST(COALESCE(MAX(record_enumeration_offset_position), 0) as bigint) AS record_enumeration_offset_position
5250
FROM collection
5351
WHERE id = $1;
5452

0 commit comments

Comments
 (0)