Skip to content

Commit

Permalink
Remove useless field
Browse files Browse the repository at this point in the history
  • Loading branch information
islamaliev committed Jun 3, 2024
1 parent 7cf39b9 commit 773ba53
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions internal/planner/type_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -303,7 +294,6 @@ func (p *Planner) makeTypeJoinOne(
parentSide: parentSide,
childSide: childSide,
childSelect: subSelect,
secondaryFieldIndex: secondaryFieldIndex,
secondaryFetchLimit: 1,
},
}, nil
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 773ba53

Please sign in to comment.