1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Copyright (c) 2025-2026 Anton Kundenko <singaraiona@gmail.com>
* All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*
* Gathers from a bound column source (generation 0 or 2, single file or
* parted) under the spec's gather output contract: the result is a new
* plain vector that owns everything it references. A STR result holds one
* pool built for it (each pooled value is copied out of the read's view
* before the next read reuses the scratch); a SYM result retains the
* source's domain at the widest contributing width class, ids widened as
* logical values; HAS_NULLS and null payloads are left as generation 0's
* gather leaves them (the type's canonical sentinel). A LIST source is
* `nyi` (lists are never encoded; callers keep their LIST code). On any
* error the partial result, its pool and its domain are released and
* nothing is published.
*/
/* Rows of `src` kept by rowsel `sel` (NULL: every row), in row order, as a
* new plain vector. Only vectors whose segment is not RAY_SEL_NONE are
* read. A large selection is gathered by pool tasks over consecutive
* segments; a failure is the lowest-row one (the scan-fail envelope), a
* cancelled dispatch `cancel`. NULL with *out set, or an owned error. */
ray_t* ;
/* Rows [lo, hi) of `src` (lo a multiple of RAY_MORSEL_ELEMS), in row
* order, as a new plain vector: every vector the span touches is read once,
* by pool tasks over consecutive segments for a large span (the lowest-row
* failure, a cancelled dispatch `cancel`). For a consumer that walks a
* column in pieces it evaluates whole, so that only one piece is decoded
* at a time. NULL with *out set, or an owned error. */
ray_t* ;
/* The operators' entry for one table slot. ray_col_gather_slot: the
* RAY_ENCCOL a row gather reads by range (slot from ray_table_get_col_enc /
* _idx), or NULL for none or a slice of an encoded column, which a source
* does not bind: the caller keeps its plain gather. ray_col_gather_enc:
* that slot bound, gathered under `sel` (by_rows false) or at ids[0..n)
* (by_rows true), released. NULL with *out set, or an owned error. */
ray_t* ;
ray_t* ;
/* Test hook: selection gathers run as several pool tasks since process
* start (a selection of at least RAY_PARALLEL_THRESHOLD rows with a
* pool: each task gathers its segments into the output range the
* selection's counts give it, STR pools appended in row order). */
uint64_t ;
/* Rows ids[0..n) of `src`, in that order, repeats included, as a new plain
* vector. Ids are bucketed by vector; each touched vector is range-read
* once and its values scattered to their output positions, or, holding at
* most its codec's point-read limit of the ids, point-read (an encoded
* integer or SYM source, nulls included; ray_col_gather_sel's few-row
* segments likewise). */
ray_t* ;
/* RAY_COLGATHER_H */