Commit 9386980
Restore broker constructor compat shim; canonicalize normalizer; sunset
Critical fix:
- SegmentPartitionMetadataManager: restore the legacy
(String tableNameWithType, String partitionColumn, String
partitionFunctionName, int numPartitions) constructor that existed on
upstream master. Removing it broke binary compatibility for external
broker plugins / vendor forks that linked against this signature.
The shim builds a synthetic ColumnPartitionConfig and delegates to
the new constructor; expression-mode tables must use the
ColumnPartitionConfig overloads.
Major fixes:
- ColumnPartitionConfig: canonicalize partitionIdNormalizer to
uppercase at construction time so downstream comparisons (mix of
case-sensitive wire format and case-insensitive older comparisons)
cannot disagree on case alone.
- PartitionFunctionFactory + ColumnPartitionMetadata: add explicit
"TODO: remove after release 1.7.0" sunset markers to all four
remaining @deprecated entries on the partition surfaces, matching
the existing sunset on SegmentPartitionConfig.getFunctionConfig.
Skipped findings (with rationale):
- Broker pruner string-form predicate (CRIT in prior reviews):
plumbing typed values through requires substantial SPI refactor.
- ByteArrayPartitionFunction normalizer mapping (claimed MASK by
reviewer): on closer inspection abs(hashCode) % n is the ABS
pattern (not MASK), so the existing return PartitionIntNormalizer
.ABS.name() is correct.
- Sentinel rename to "__functionExpr__": the literal
"FunctionExpr" is now permanent on-the-wire and changing it
would break test-built segments. The drift regression test already
guards against future PartitionFunctionType enum collisions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 5b13315 commit 9386980
4 files changed
Lines changed: 23 additions & 2 deletions
File tree
- pinot-broker/src/main/java/org/apache/pinot/broker/routing/segmentpartition
- pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/partition
- metadata
- pinot-spi/src/main/java/org/apache/pinot/spi/config/table
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
163 | | - | |
| 165 | + | |
| 166 | + | |
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
0 commit comments