Repository navigation
Commit a73e03c
partition_columns: schema-driven PartitionKind opt-in for Hive-style GROUP BY
Companion half of batch_index v1. Workers declare ``Meta.partition_kind``
(one of NOT_PARTITIONED / SINGLE_VALUE_PARTITIONS / OVERLAPPING /
DISJOINT) and annotate the partition fields in the bind schema via the
new ``partition_field()`` helper (per-field Arrow metadata
``vgi.partition_column``). At emit time the framework auto-extracts
``(min, max)`` per column from the chunk and encodes a 2-row Arrow IPC
RecordBatch into the ``vgi_partition_values#b64`` custom_metadata key;
explicit overrides via ``out.emit(..., partition_values={"c": (min, max)})``
take ``pa.Scalar`` pairs so type round-trip is exact.
DuckDB's planner only consumes SINGLE_VALUE_PARTITIONS today (unlocks
PhysicalPartitionedAggregate at plan_aggregate.cpp:108); the other
three kinds round-trip on the wire for forward compat and fall back to
HASH_GROUP_BY upstream.
Adds four reference fixtures (country / region+year / explicit override /
disjoint range) and four broken fixtures driving the contract tests on
the C++ side.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 932a0c9 commit a73e03c
9 files changed
Lines changed: 1239 additions & 10 deletions
File tree
- vgi
- _test_fixtures
- table
- catalog
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
| |||
110 | 122 | | |
111 | 123 | | |
112 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
113 | 129 | | |
114 | 130 | | |
| 131 | + | |
| 132 | + | |
115 | 133 | | |
116 | 134 | | |
117 | 135 | | |
| |||
140 | 158 | | |
141 | 159 | | |
142 | 160 | | |
| 161 | + | |
143 | 162 | | |
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| 166 | + | |
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
| |||
0 commit comments