From 773ba53f21e794819e20ac395905e52cbab50afd Mon Sep 17 00:00:00 2001 From: Islam Aleiv Date: Mon, 3 Jun 2024 13:23:42 +0200 Subject: [PATCH] Remove useless field --- internal/planner/type_join.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/planner/type_join.go b/internal/planner/type_join.go index 5ab58bbe43..bf1bd24c39 100644 --- a/internal/planner/type_join.go +++ b/internal/planner/type_join.go @@ -259,15 +259,6 @@ func (p *Planner) makeTypeJoinOne( return nil, client.NewErrFieldNotExist(subSelect.Name) } - // TODO: remove this block? - var secondaryFieldIndex immutable.Option[int] - if !parentsRelFieldDef.IsPrimaryRelation { - idFieldName := parentsRelFieldDef.Name - secondaryFieldIndex = immutable.Some( - parent.documentMapping.FirstIndexOfName(idFieldName + request.RelatedObjectID), - ) - } - parentSide := joinSide{ plan: sourcePlan, relFieldDef: parentsRelFieldDef, @@ -303,7 +294,6 @@ func (p *Planner) makeTypeJoinOne( parentSide: parentSide, childSide: childSide, childSelect: subSelect, - secondaryFieldIndex: secondaryFieldIndex, secondaryFetchLimit: 1, }, }, nil @@ -535,7 +525,6 @@ type invertibleTypeJoin struct { parentSide joinSide childSide joinSide - secondaryFieldIndex immutable.Option[int] secondaryFetchLimit uint // docsToYield contains documents read and ready to be yielded by this node.