From 63b6283919ccfb7a339523cb080e16704924884d Mon Sep 17 00:00:00 2001 From: Luca Rossetto Date: Mon, 11 Dec 2023 21:30:29 +0100 Subject: [PATCH] Minor fix in RelationExpander --- .../org/vitrivr/engine/query/transform/RelationExpander.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vitrivr-engine-query/src/main/kotlin/org/vitrivr/engine/query/transform/RelationExpander.kt b/vitrivr-engine-query/src/main/kotlin/org/vitrivr/engine/query/transform/RelationExpander.kt index a40d42c3..4523bc39 100644 --- a/vitrivr-engine-query/src/main/kotlin/org/vitrivr/engine/query/transform/RelationExpander.kt +++ b/vitrivr-engine-query/src/main/kotlin/org/vitrivr/engine/query/transform/RelationExpander.kt @@ -38,7 +38,7 @@ class RelationExpander( val newIds = relations.flatMap { listOf(it.first, it.third) } - ids - val newRetrievables = retrievableReader.getAll(newIds.toList()) + val newRetrievables = if (newIds.isNotEmpty()) retrievableReader.getAll(newIds.toList()) else emptySequence() val allRetrieved = (inputRetrieved.map { Retrieved.PlusRelationship(it) } + newRetrievables.map { Retrieved.WithRelationship(it) }).associateBy { it.id }