Commit 53607a3a authored by craig[bot]'s avatar craig[bot]

Merge #48750

48750: opt: make for loop in MapScanFilterCols more idiomatic r=mgartner a=mgartner

This is a small clean-up to make a for loop within `MapScanFilterCols`
of `xform/custom_funcs.go` more consistent with the style found
elsewhere in the file. It now uses slice indexing to build a
`FiltersExpr` rather than `append`.

Release note: None
Co-authored-by: default avatarMarcus Gartner <[email protected]>
parents 62f32ca9 59c9cd80
......@@ -2693,10 +2693,10 @@ func (c *CustomFuncs) MapScanFilterCols(
}
// Map the columns of each filter in the FiltersExpr.
newFilters := make([]memo.FiltersItem, 0, len(filters))
newFilters := make([]memo.FiltersItem, len(filters))
for i := range filters {
expr := c.MapFiltersItemCols(&filters[i], colMap)
newFilters = append(newFilters, c.e.f.ConstructFiltersItem(expr))
newFilters[i] = c.e.f.ConstructFiltersItem(expr)
}
return newFilters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment