Commit 3425783
fix: Widen Athena integer type mapping for unsigned ints
pa_to_athena_value_type mapped every unsigned Arrow int (uint8/16/32/64)
to Athena tinyint, a signed 8-bit type (-128..127). Any unsigned value
above 127 (e.g. a uint32 column) overflows the type in the generated
CREATE TABLE DDL built by aws_utils.py.
Widen each unsigned type to the next-larger signed Athena type, matching
the widening already used for Postgres in arrow_to_pg_type in this module
(uint8->smallint, uint16->int, uint32/uint64->bigint). Signed inputs are
unchanged. Adds a regression test for both the widened and signed cases.
Signed-off-by: Nikolaus Schuetz <nikolauspschuetz@gmail.com>1 parent 934d341 commit 3425783
2 files changed
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2291 | 2291 | | |
2292 | 2292 | | |
2293 | 2293 | | |
2294 | | - | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
2298 | 2302 | | |
2299 | 2303 | | |
2300 | 2304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
531 | 532 | | |
532 | 533 | | |
533 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
534 | 554 | | |
535 | 555 | | |
536 | 556 | | |
| |||
0 commit comments