*/}} CopyWithReorderedSource copies a value at position order[sel[i]] in src into the receiver at position sel[i]. len(sel) elements are copied. Resulting values of elements not mentioned in sel are undefined after this function.
(src *Vec, sel, order []int)
| 311 | // Resulting values of elements not mentioned in sel are undefined after |
| 312 | // this function. |
| 313 | func (v *Vec) CopyWithReorderedSource(src *Vec, sel, order []int) { |
| 314 | if len(sel) == 0 { |
| 315 | return |
| 316 | } |
| 317 | if v.nulls.MaybeHasNulls() { |
| 318 | v.nulls.UnsetNulls() |
| 319 | } |
| 320 | switch v.CanonicalTypeFamily() { |
| 321 | // {{range .}} |
| 322 | case _CANONICAL_TYPE_FAMILY: |
| 323 | switch v.t.Width() { |
| 324 | // {{range .WidthOverloads}} |
| 325 | case _TYPE_WIDTH: |
| 326 | fromCol := src.TemplateType() |
| 327 | toCol := v.TemplateType() |
| 328 | n := len(sel) |
| 329 | _ = sel[n-1] |
| 330 | if src.MaybeHasNulls() { |
| 331 | nulls := src.Nulls() |
| 332 | _COPY_WITH_REORDERED_SOURCE(true) |
| 333 | } else { |
| 334 | _COPY_WITH_REORDERED_SOURCE(false) |
| 335 | } |
| 336 | // {{end}} |
| 337 | } |
| 338 | // {{end}} |
| 339 | default: |
| 340 | panic(fmt.Sprintf("unhandled type %s", v.t)) |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | // Window returns a "window" into the Vec. A "window" is similar to Golang's |
| 345 | // slice of the current Vec from [start, end), but the returned object is NOT |
nothing calls this directly
no test coverage detected