Commit dd1f4c2
committed
adhoc: add Arrow IPC client APIs and deprecate the JSON format
JSON is lossy: it coerces wide integers to f64, cannot represent SQL
`MAP` keys that are not strings, and silently drops result columns
that share a name. Arrow IPC does not have these limitations and is
already used internally by fda for tabular display.
Python:
- Add `pyarrow` as a runtime dependency.
- Add `FelderaClient.query_as_arrow_ipc` and the matching
`Pipeline.query_arrow_ipc` helper that yield `pyarrow.RecordBatch`
objects over an HTTP stream from the `/query` endpoint.
- Extract the JSON streaming loop into a private
`_query_json_stream` so `Pipeline.query()` can keep its existing
dict-based contract without emitting a DeprecationWarning to user
code that has not migrated yet.
- Emit a `DeprecationWarning` from `FelderaClient.query_as_json` so
external callers are nudged toward the Arrow IPC path.
fda:
- Promote the JSON deprecation notice to a stderr warning so it is
visible without enabling `log`-level configuration.
Tests:
- Cover the duplicate-column case from
#4218 with an Arrow IPC
round-trip that requires both `x` columns to survive.
- Cover wide-integer fidelity (2**53 + 1) and the common primitive
SQL types via Arrow IPC.
- Add an `fda --format arrow_ipc query` smoke run to test.bash.
Fixes #4219
Fixex #3923
Fixes #42181 parent be972e1 commit dd1f4c2
5 files changed
Lines changed: 320 additions & 15 deletions
File tree
- crates/fda
- src
- python
- feldera
- rest
- tests/runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
977 | | - | |
| 977 | + | |
978 | 978 | | |
979 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
980 | 985 | | |
981 | 986 | | |
982 | 987 | | |
| |||
994 | 999 | | |
995 | 1000 | | |
996 | 1001 | | |
997 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
998 | 1005 | | |
999 | 1006 | | |
1000 | 1007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
1275 | 1276 | | |
1276 | 1277 | | |
1277 | 1278 | | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1278 | 1284 | | |
1279 | 1285 | | |
1280 | 1286 | | |
| |||
1297 | 1303 | | |
1298 | 1304 | | |
1299 | 1305 | | |
1300 | | - | |
| 1306 | + | |
1301 | 1307 | | |
1302 | 1308 | | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1312 | 1313 | | |
1313 | 1314 | | |
1314 | 1315 | | |
| |||
1325 | 1326 | | |
1326 | 1327 | | |
1327 | 1328 | | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1328 | 1362 | | |
1329 | 1363 | | |
1330 | 1364 | | |
| |||
0 commit comments