Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] unpickling a pyarrow table with dictionary fields crashes #23510

Closed
asfimport opened this issue Nov 20, 2019 · 2 comments
Closed

[Python] unpickling a pyarrow table with dictionary fields crashes #23510

asfimport opened this issue Nov 20, 2019 · 2 comments

Comments

@asfimport
Copy link

The following code crashes on this check:

F1120 07:51:37.523720 12432 array.cc:773]  Check failed: (data->dictionary) != (nullptr) 

 

import cPickle as pickle
import pandas as pd
import pyarrow as pa

df = pd.DataFrame([{"cat": "a", "val":1},{"cat": "b", "val":2} ])
df["cat"] = df["cat"].astype('category')index_table = pa.Table.from_pandas(df, preserve_index=False)

with open('/tmp/zz.pickle', 'wb') as f:
    pickle.dump(index_table, f, protocol=2)

with open('/tmp/zz.pickle', 'rb') as f:
   index_table = pickle.load(f)

 

Used Python2 with the following environment:

Package         Version
--------------- -------
enum34          1.1.6  
futures         3.3.0  
numpy           1.16.5 
pandas          0.24.2 
pip             19.3.1 
pyarrow         0.14.1 (0.14.0 and up suffer from this issue)
python-dateutil 2.8.1  
pytz            2019.3 
setuptools      41.6.0 
six             1.13.0 

Reporter: Yevgeni Litvin
Assignee: Joris Van den Bossche / @jorisvandenbossche

PRs and other links:

Note: This issue was originally created as ARROW-7214. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Joris Van den Bossche / @jorisvandenbossche:
[~selitvin] Thanks for the report! I can confirm this crash with latest arrow.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
Issue resolved by pull request 5871
#5871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants