Commit c9f45a2
authored
fix: Validate and normalize inet test values (#2205)
#### Summary
The inet type, uses the `net.ParseCIDR` function which when returning the network, actually drop some of the details of the CIDR string that is passed in...
```
It returns the IP address and the network implied by the IP and prefix length. For example, ParseCIDR("192.0.2.1/24") returns the IP address 192.0.2.1 and the network 192.0.2.0/24.
```
This fix ensures that all inet values will be unchanged if they go through a read --> write --> read (like we do in the filetypes tests)
This issue was discovered in the filetypes tests where a value was written to a parquet file then read back into an arrow record where the inet builder normalized the data and when compared to the original record a difference was detected1 parent 6b91b19 commit c9f45a2
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| 320 | + | |
| 321 | + | |
319 | 322 | | |
320 | 323 | | |
321 | | - | |
| 324 | + | |
322 | 325 | | |
323 | 326 | | |
324 | 327 | | |
| |||
0 commit comments