Commit 0124d5b
authored
apacheGH-49078: [FS][Azure] Fix lossy pickling of
### Rationale for this change
Fix apache#49078
### What changes are included in this PR?
- Implement getters on the C++ side of `AzureOptions`, for the values that are currently stored only on the python side.
- This required adding some more member variables
- I decided to add `ClearCredentials` , so that it can't get into strange states by configuring one credential type then another. IMO configuring the credentials during initialisation on the `AzureOptions` would be neater but I don't want to make this PR too big.
- Update the C++ side `AzureOptions::Equals`
- Remove python side `self` attributes and instead depend on getters from C++ side.
### Are these changes tested?
- Updated tests on the C++ side for the updated `Equals` and newly added getter methods.
- Added a fixture `pickle_with_and_without_subtree_filesystem`, which can be used in place of the `pickle_module`. This adds test combinations with and without wrapping the filesystem in a `SubTreeFilesystem` before pickling it.
### Are there any user-facing changes?
Only that pickling `SubTreeFileSystem(base_path, AzureFileSystem(...))` now works properly.
* GitHub Issue: apache#49078
Authored-by: Thomas Newton <thomas.w.newton@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>SubTreeFileSystem(base_path, AzureFileSystem(...)) (apache#49140)1 parent aae49e8 commit 0124d5b
File tree
6 files changed
+194
-51
lines changed- cpp/src/arrow/filesystem
- python/pyarrow
- includes
- tests
6 files changed
+194
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| |||
318 | 322 | | |
319 | 323 | | |
320 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
321 | 336 | | |
| 337 | + | |
322 | 338 | | |
323 | 339 | | |
324 | 340 | | |
325 | 341 | | |
326 | 342 | | |
327 | 343 | | |
| 344 | + | |
328 | 345 | | |
329 | 346 | | |
330 | 347 | | |
331 | 348 | | |
332 | 349 | | |
| 350 | + | |
333 | 351 | | |
334 | 352 | | |
335 | 353 | | |
336 | 354 | | |
| 355 | + | |
337 | 356 | | |
338 | 357 | | |
339 | 358 | | |
340 | 359 | | |
341 | 360 | | |
342 | 361 | | |
343 | | - | |
| 362 | + | |
344 | 363 | | |
345 | 364 | | |
346 | 365 | | |
347 | 366 | | |
| 367 | + | |
348 | 368 | | |
349 | 369 | | |
350 | 370 | | |
351 | 371 | | |
352 | 372 | | |
353 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
354 | 378 | | |
355 | 379 | | |
356 | 380 | | |
357 | 381 | | |
358 | 382 | | |
359 | 383 | | |
360 | 384 | | |
| 385 | + | |
| 386 | + | |
361 | 387 | | |
362 | 388 | | |
363 | 389 | | |
364 | 390 | | |
365 | 391 | | |
366 | 392 | | |
367 | 393 | | |
| 394 | + | |
368 | 395 | | |
369 | 396 | | |
370 | 397 | | |
371 | 398 | | |
372 | 399 | | |
373 | 400 | | |
| 401 | + | |
374 | 402 | | |
375 | 403 | | |
376 | 404 | | |
377 | 405 | | |
378 | 406 | | |
379 | 407 | | |
| 408 | + | |
380 | 409 | | |
381 | 410 | | |
382 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 102 | | |
107 | 103 | | |
108 | 104 | | |
| |||
126 | 122 | | |
127 | 123 | | |
128 | 124 | | |
| 125 | + | |
129 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
496 | 501 | | |
497 | 502 | | |
498 | 503 | | |
| |||
509 | 514 | | |
510 | 515 | | |
511 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
512 | 534 | | |
513 | 535 | | |
514 | 536 | | |
| |||
517 | 539 | | |
518 | 540 | | |
519 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
520 | 547 | | |
521 | 548 | | |
522 | 549 | | |
523 | 550 | | |
524 | 551 | | |
525 | 552 | | |
526 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
527 | 559 | | |
528 | 560 | | |
529 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
530 | 567 | | |
531 | 568 | | |
532 | 569 | | |
533 | 570 | | |
534 | 571 | | |
535 | 572 | | |
536 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
537 | 579 | | |
538 | 580 | | |
539 | 581 | | |
540 | 582 | | |
541 | 583 | | |
542 | 584 | | |
543 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
544 | 591 | | |
545 | 592 | | |
546 | 593 | | |
547 | 594 | | |
548 | 595 | | |
549 | 596 | | |
550 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
551 | 603 | | |
552 | 604 | | |
553 | 605 | | |
554 | 606 | | |
555 | | - | |
556 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
557 | 634 | | |
558 | 635 | | |
559 | 636 | | |
| |||
1679 | 1756 | | |
1680 | 1757 | | |
1681 | 1758 | | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
1685 | 1767 | | |
1686 | 1768 | | |
1687 | 1769 | | |
| |||
0 commit comments