Commit 625b1df
Also emit canonical Arrow JSON extension metadata keys
Arrow defines a canonical extension type for JSON
(https://arrow.apache.org/docs/format/CanonicalExtensions.html#json):
ARROW:extension:name = arrow.json
ARROW:extension:metadata = {}
Emit those alongside the existing is_json=true key so JSON-bearing string
fields are recognized by the broader Arrow ecosystem (arrow-rs's Json
extension type, pyarrow, DuckDB, Polars, etc.) while remaining
back-compatible with consumers keyed on is_json.
The change is contained to json_field_metadata(); all four production
write sites already route through that helper. Detection via
is_json_union remains purely structural and is unaffected. Tests are
extended to assert all three keys, and the helper is re-exported at the
crate root so test fixtures can use it instead of duplicating literals.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a3d9f62 commit 625b1df
3 files changed
Lines changed: 30 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | | - | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 | | |
184 | | - | |
185 | | - | |
| 194 | + | |
| 195 | + | |
186 | 196 | | |
187 | 197 | | |
188 | 198 | | |
| |||
437 | 447 | | |
438 | 448 | | |
439 | 449 | | |
440 | | - | |
| 450 | + | |
441 | 451 | | |
442 | 452 | | |
443 | 453 | | |
444 | 454 | | |
445 | | - | |
| 455 | + | |
446 | 456 | | |
447 | 457 | | |
448 | 458 | | |
| |||
632 | 642 | | |
633 | 643 | | |
634 | 644 | | |
635 | | - | |
636 | | - | |
| 645 | + | |
637 | 646 | | |
638 | 647 | | |
639 | 648 | | |
| |||
666 | 675 | | |
667 | 676 | | |
668 | 677 | | |
669 | | - | |
670 | | - | |
| 678 | + | |
671 | 679 | | |
672 | 680 | | |
673 | 681 | | |
| |||
0 commit comments