-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Fix read_parquet not working with data type pyarrow list (#57411) #58156
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,6 +348,20 @@ def test_cross_engine_fp_pa(df_cross_compat, pa, fp): | |
tm.assert_frame_equal(result, df[["a", "d"]]) | ||
|
||
|
||
def test_pyarrow_list(): | ||
pytest.importorskip("fastparquet") | ||
import pyarrow as pa | ||
|
||
list_int = pa.list_(pa.int64()) | ||
s = pd.Series([[1, 1], [2, 2]], dtype=pd.ArrowDtype(list_int)) | ||
|
||
df = pd.DataFrame(s, columns=["col"]) | ||
df.to_parquet("ex.parquet") | ||
|
||
result = read_parquet(path="ex.parquet", dtype_backend="pyarrow") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems off to me - so even with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi William. |
||
tm.assert_frame_equal(df, result) | ||
|
||
|
||
class Base: | ||
def check_error_on_write(self, df, engine, exc, err_msg): | ||
# check that we are raising the exception on writing | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix is too specific and probably doesn't fix the core issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mroeschke I second this. A more general fix is needed.