Skip to content

Commit 268fa4e

Browse files
committed
pull upstream
2 parents 95d8ed1 + 7772fe0 commit 268fa4e

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
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: 12 additions & 12 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) {
@@ -183,7 +183,7 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
183183
return nil, err
184184
}
185185

186-
nestedIterationFinished := true
186+
nestedIterationFinished := true
187187
for _, evaluator := range i.nestedState.iterEvaluators {
188188
if !evaluator.finished && evaluator.iter != nil {
189189
nestedIterationFinished = false
@@ -195,20 +195,20 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
195195
i.nestedState = nil
196196
return i.ProjectRowWithNestedIters(ctx)
197197
}
198-
198+
199199
return row, nil
200200
}
201201

202202
row, err := i.childIter.Next(ctx)
203203
if err != nil {
204204
return nil, err
205205
}
206-
206+
207207
i.nestedState = &nestedIterState{
208208
sourceRow: row,
209209
}
210-
211-
// We need a new set of projections, with any iterator-returning expressions replaced by new expressions that will
210+
211+
// We need a new set of projections, with any iterator-returning expressions replaced by new expressions that will
212212
// return the result of the iteration on each call to Eval. We also need to keep a list of all such iterators, so
213213
// that we can tell when they have all finished their iterations.
214214
var rowIterEvaluators []*RowIterEvaluator
@@ -228,20 +228,20 @@ func (i *ProjectIter) ProjectRowWithNestedIters(
228228
rowIterEvaluators = append(rowIterEvaluators, evaluator)
229229
return evaluator, transform.NewTree, nil
230230
}
231-
231+
232232
return e, transform.SameTree, nil
233233
})
234-
234+
235235
if err != nil {
236236
return nil, err
237237
}
238238

239239
newProjs[i] = p
240240
}
241-
241+
242242
i.nestedState.projections = newProjs
243243
i.nestedState.iterEvaluators = rowIterEvaluators
244-
244+
245245
return i.ProjectRowWithNestedIters(ctx)
246246
}
247247

0 commit comments

Comments
 (0)