Commit 662c0df
committed
Reject DecimalType with precision larger than 38
The Iceberg spec requires decimal precision to be 38 or less, but
DecimalType(39, 0) (and parsing 'decimal(39, 0)') was accepted silently,
producing a value not representable in decimal's fixed-byte storage. Validate
precision <= 38 in DecimalType.__init__, matching the Java reference which
raises for precision > 38.
Closes #35831 parent 9d36e23 commit 662c0df
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
| |||
0 commit comments