You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "anjakefala (via GitHub)" <gi...@apache.org> on 2023/09/12 18:21:47 UTC

[GitHub] [arrow] anjakefala opened a new pull request, #37683: GH-26685: [Python] use IPC for pickle serialisation

anjakefala opened a new pull request, #37683:
URL: https://github.com/apache/arrow/pull/37683

   ### Rationale for this change
   Existing pickling serialises the whole buffer, even if the Array is sliced.
   
   ### What changes are included in this PR?
   
   Changes use Arrow's buffer truncation implemented for IPC serialization for pickling and restoring.
   
   Relies on a RecordBatch wrapper, adding ~230 bytes to the pickled payload per Array chunk.
   
   Chunks are not automatically combined pre-pickling.
   
   ### Are these changes tested?
   
   Yes
   
   ### Are there any user-facing changes?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-26685: [Python] use IPC for pickle serialisation [arrow]

Posted by "anjakefala (via GitHub)" <gi...@apache.org>.
anjakefala closed pull request #37683: GH-26685: [Python] use IPC for pickle serialisation
URL: https://github.com/apache/arrow/pull/37683


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-26685: [Python] use IPC for pickle serialisation [arrow]

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #37683:
URL: https://github.com/apache/arrow/pull/37683#issuecomment-1746304861

   > I was trying to be clever by creating a set of parameters that all of the pickling tests used, but it may not be appropriate for the protocol5 ones.
   
   If you keep the parameters as they were, do the tests pass?
   
   > The other thing I am noticing is that sliced + pickled Boolean arrays are a lot larger than any other data-type:
   
   I am curious if you pickle the whole boolean array (not sliced) - what is the diff in size there?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] anjakefala commented on pull request #37683: GH-26685: [Python] use IPC for pickle serialisation

Posted by "anjakefala (via GitHub)" <gi...@apache.org>.
anjakefala commented on PR #37683:
URL: https://github.com/apache/arrow/pull/37683#issuecomment-1716277164

   I was trying to be clever by creating a set of parameters that all of the pickling tests used, but it may not be appropriate for the protocol5 ones.
   
   The other thing I am noticing is that sliced + pickled Boolean arrays are a lot larger than any other data-type:
   
   ```
         # Check truncation upon serialization
   >       assert len(serialized_slice) <= 0.5 * len(serialized_arr)
   E       AssertionError: assert 367 <= (0.5 * 607)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-26685: [Python] use IPC for pickle serialisation [arrow]

Posted by "anjakefala (via GitHub)" <gi...@apache.org>.
anjakefala commented on PR #37683:
URL: https://github.com/apache/arrow/pull/37683#issuecomment-1749774332

   > If you keep the parameters as they were, do the tests pass?
   
   No!
   
   I am still wrapping my head around the PEP, but the changes do not seem to adhere to [PEP-574](https://peps.python.org/pep-0574/).
   
   One example from the test CI:
   `pyarrow/tests/test_array.py::test_array_pickle_protocol5[builtin_pickle-data0-typ0] - assert [0, 140696923189512] == [0, 140696923177856] `
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-26685: [Python] use IPC for pickle serialisation [arrow]

Posted by "anjakefala (via GitHub)" <gi...@apache.org>.
anjakefala commented on PR #37683:
URL: https://github.com/apache/arrow/pull/37683#issuecomment-1756461068

   Confirmed that this approach would break support for [pickle protocol 5 for out of band](https://peps.python.org/pep-0574/) data. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org