Skip to content

Commit 7772fe0

Browse files
committed
[ga-format-pr] Run ./format_repo.sh to fix formatting
1 parent 0d4e630 commit 7772fe0

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

sql/plan/project.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ import (
2626
// Project is a projection of certain expression from the children node.
2727
type Project struct {
2828
UnaryNode
29-
// Projections are the expressions to be projected on the row returned by the child node
30-
Projections []sql.Expression
29+
// Projections are the expressions to be projected on the row returned by the child node
30+
Projections []sql.Expression
3131
// CanDefer is true when the projection evaluation can be deferred to row spooling, which allows us to avoid a
32-
// separate iterator for the project node.
33-
CanDefer bool
34-
// IncludesNestedIters is true when the projection includes nested iterators because of expressions that return
32+
// separate iterator for the project node.
33+
CanDefer bool
34+
// IncludesNestedIters is true when the projection includes nested iterators because of expressions that return
3535
// a RowIter.
3636
IncludesNestedIters bool
3737
deps sql.ColSet

sql/rowexec/rel_iters.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ type ProjectIter struct {
135135
}
136136

137137
type nestedIterState struct {
138-
projections []sql.Expression
139-
sourceRow sql.Row
140-
iterEvaluators []*RowIterEvaluator
138+
projections []sql.Expression
139+
sourceRow sql.Row
140+
iterEvaluators []*RowIterEvaluator
141141
}
142142

143143
func (i *ProjectIter) Next(ctx *sql.Context) (sql.Row, error) {
@@ -175,7 +175,7 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
175175
) (sql.Row, error) {
176176

177177
projections := i.projs
178-
178+
179179
// For the set of iterators, we return one row each element in the longest of the iterators provided.
180180
// Other iterator values will be NULL after they are depleted. All non-iterator fields for the row are returned
181181
// identically for each row in the result set.
@@ -185,7 +185,7 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
185185
return nil, err
186186
}
187187

188-
nestedIterationFinished := true
188+
nestedIterationFinished := true
189189
for _, evaluator := range i.nestedState.iterEvaluators {
190190
if !evaluator.finished && evaluator.iter != nil {
191191
nestedIterationFinished = false
@@ -197,20 +197,20 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
197197
i.nestedState = nil
198198
return i.ProjectRowWithNestedIters(ctx)
199199
}
200-
200+
201201
return row, nil
202202
}
203203

204204
row, err := i.childIter.Next(ctx)
205205
if err != nil {
206206
return nil, err
207207
}
208-
208+
209209
i.nestedState = &nestedIterState{
210210
sourceRow: row,
211211
}
212-
213-
// We need a new set of projections, with any iterator-returning expressions replaced by new expressions that will
212+
213+
// We need a new set of projections, with any iterator-returning expressions replaced by new expressions that will
214214
// return the result of the iteration on each call to Eval. We also need to keep a list of all such iterators, so
215215
// that we can tell when they have all finished their iterations.
216216
var rowIterEvaluators []*RowIterEvaluator
@@ -230,20 +230,20 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
230230
rowIterEvaluators = append(rowIterEvaluators, evaluator)
231231
return evaluator, transform.NewTree, nil
232232
}
233-
233+
234234
return e, transform.SameTree, nil
235235
})
236-
236+
237237
if err != nil {
238238
return nil, err
239239
}
240240

241241
newProjs[i] = p
242242
}
243-
243+
244244
i.nestedState.projections = newProjs
245245
i.nestedState.iterEvaluators = rowIterEvaluators
246-
246+
247247
return i.ProjectRowWithNestedIters(ctx)
248248
}
249249

0 commit comments

Comments
 (0)