Repository navigation
Commit 2afc1d3
authored
## What's Changed
`formatIntervalYear` and `formatIntervalDay` build the Oracle-style
interval strings the JDBC interval accessor returns from
`getString()`/`getObject()` with `String.format` and no explicit locale,
so `java.util.Formatter` renders the `%d` digits using the JVM default
locale. On a JVM whose default locale uses non-ASCII digits (`ar-EG`,
`bn-BD`, `mr-IN`, ...) an interval comes back as `+٠٢١-٠٢` instead of
`+021-02`, which corrupts the value handed to JDBC clients and breaks
anything parsing it as ASCII. Pass `Locale.ROOT` to both calls, the same
fix GH-1300 applied to the C Data Interface format strings.
Closes #1311.
1 parent 7cd07b1 commit 2afc1d3
2 files changed
Lines changed: 26 additions & 2 deletions
File tree
- flight/flight-sql-jdbc-core/src
- main/java/org/apache/arrow/driver/jdbc/utils
- test/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
257 | 273 | | |
258 | 274 | | |
259 | 275 | | |
| |||
0 commit comments