[jira] [Comment Edited] (ARROW-2367) ListArray has trouble with sizes greater than kMaximumCapacity
[ https://issues.apache.org/jira/browse/ARROW-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432609#comment-16432609 ] Krisztian Szucs edited comment on ARROW-2367 at 4/10/18 5:20 PM: - Got it now Uwe, thanks! Just saw the assertion line, totally missed it. was (Author: kszucs): Got it now Uwe, thanks! > ListArray has trouble with sizes greater than kMaximumCapacity > -- > > Key: ARROW-2367 > URL: https://issues.apache.org/jira/browse/ARROW-2367 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.9.0 >Reporter: Bryant Menn >Priority: Major > > When creating a Pandas dataframe with lists as elements as a column the > following error occurs when converting to a {{pyarrow.Table}} object. > {code} > Traceback (most recent call last): > File "arrow-2227.py", line 16, in > arr = pa.array(df['strings'], from_pandas=True) > File "array.pxi", line 177, in pyarrow.lib.array > File "error.pxi", line 77, in pyarrow.lib.check_status > File "error.pxi", line 77, in pyarrow.lib.check_status > pyarrow.lib.ArrowInvalid: BinaryArray cannot contain more than 2147483646 > bytes, have 2147483647 > {code} > The following code was used to generate the error (adapted from ARROW-2227): > {code} > import pandas as pd > import pyarrow as pa > # Commented lines were used to test non-binary data types, both cause the > same error > v1 = b'x' * 1 > v2 = b'x' * 147483646 > # v1 = 'x' * 1 > # v2 = 'x' * 147483646 > df = pd.DataFrame({ > 'strings': [[v1]] * 20 + [[v2]] + [[b'x']] > # 'strings': [[v1]] * 20 + [[v2]] + [['x']] > }) > arr = pa.array(df['strings'], from_pandas=True) > assert isinstance(arr, pa.ChunkedArray), type(arr) > {code} > Code was run using Python 3.6 with PyArrow installed from conda-forge on > macOS High Sierra. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (ARROW-2367) ListArray has trouble with sizes greater than kMaximumCapacity
[ https://issues.apache.org/jira/browse/ARROW-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432461#comment-16432461 ] Krisztian Szucs edited comment on ARROW-2367 at 4/10/18 3:29 PM: - What's the expected output? It should be able to hold `2^31 - 1` bytes? According to my investigation https://github.com/apache/arrow/blob/f9c070162acd87caf031723fb8d7e9c9a7317c0e/cpp/src/arrow/builder.h#L44 limits to `((2^31) - 1) - 1` was (Author: kszucs): What's the expected output? It should be able to hold `2^31 - 1` bytes? According to my investigation https://github.com/apache/arrow/blob/f9c070162acd87caf031723fb8d7e9c9a7317c0e/cpp/src/arrow/builder.h#L44 limits to `(2^31) - 1` > ListArray has trouble with sizes greater than kMaximumCapacity > -- > > Key: ARROW-2367 > URL: https://issues.apache.org/jira/browse/ARROW-2367 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.9.0 >Reporter: Bryant Menn >Priority: Major > > When creating a Pandas dataframe with lists as elements as a column the > following error occurs when converting to a {{pyarrow.Table}} object. > {code} > Traceback (most recent call last): > File "arrow-2227.py", line 16, in > arr = pa.array(df['strings'], from_pandas=True) > File "array.pxi", line 177, in pyarrow.lib.array > File "error.pxi", line 77, in pyarrow.lib.check_status > File "error.pxi", line 77, in pyarrow.lib.check_status > pyarrow.lib.ArrowInvalid: BinaryArray cannot contain more than 2147483646 > bytes, have 2147483647 > {code} > The following code was used to generate the error (adapted from ARROW-2227): > {code} > import pandas as pd > import pyarrow as pa > # Commented lines were used to test non-binary data types, both cause the > same error > v1 = b'x' * 1 > v2 = b'x' * 147483646 > # v1 = 'x' * 1 > # v2 = 'x' * 147483646 > df = pd.DataFrame({ > 'strings': [[v1]] * 20 + [[v2]] + [[b'x']] > # 'strings': [[v1]] * 20 + [[v2]] + [['x']] > }) > arr = pa.array(df['strings'], from_pandas=True) > assert isinstance(arr, pa.ChunkedArray), type(arr) > {code} > Code was run using Python 3.6 with PyArrow installed from conda-forge on > macOS High Sierra. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (ARROW-2367) ListArray has trouble with sizes greater than kMaximumCapacity
[ https://issues.apache.org/jira/browse/ARROW-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432461#comment-16432461 ] Krisztian Szucs edited comment on ARROW-2367 at 4/10/18 3:29 PM: - What's the expected output? It should be able to hold `2^31 - 1` bytes? According to my investigation the limit is set to `((2^31) - 1) - 1`. https://github.com/apache/arrow/blob/f9c070162acd87caf031723fb8d7e9c9a7317c0e/cpp/src/arrow/builder.h#L44 was (Author: kszucs): What's the expected output? It should be able to hold `2^31 - 1` bytes? According to my investigation https://github.com/apache/arrow/blob/f9c070162acd87caf031723fb8d7e9c9a7317c0e/cpp/src/arrow/builder.h#L44 limits to `((2^31) - 1) - 1` > ListArray has trouble with sizes greater than kMaximumCapacity > -- > > Key: ARROW-2367 > URL: https://issues.apache.org/jira/browse/ARROW-2367 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.9.0 >Reporter: Bryant Menn >Priority: Major > > When creating a Pandas dataframe with lists as elements as a column the > following error occurs when converting to a {{pyarrow.Table}} object. > {code} > Traceback (most recent call last): > File "arrow-2227.py", line 16, in > arr = pa.array(df['strings'], from_pandas=True) > File "array.pxi", line 177, in pyarrow.lib.array > File "error.pxi", line 77, in pyarrow.lib.check_status > File "error.pxi", line 77, in pyarrow.lib.check_status > pyarrow.lib.ArrowInvalid: BinaryArray cannot contain more than 2147483646 > bytes, have 2147483647 > {code} > The following code was used to generate the error (adapted from ARROW-2227): > {code} > import pandas as pd > import pyarrow as pa > # Commented lines were used to test non-binary data types, both cause the > same error > v1 = b'x' * 1 > v2 = b'x' * 147483646 > # v1 = 'x' * 1 > # v2 = 'x' * 147483646 > df = pd.DataFrame({ > 'strings': [[v1]] * 20 + [[v2]] + [[b'x']] > # 'strings': [[v1]] * 20 + [[v2]] + [['x']] > }) > arr = pa.array(df['strings'], from_pandas=True) > assert isinstance(arr, pa.ChunkedArray), type(arr) > {code} > Code was run using Python 3.6 with PyArrow installed from conda-forge on > macOS High Sierra. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (ARROW-2367) ListArray has trouble with sizes greater than kMaximumCapacity
[ https://issues.apache.org/jira/browse/ARROW-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432461#comment-16432461 ] Krisztian Szucs edited comment on ARROW-2367 at 4/10/18 3:28 PM: - What's the expected output? It should be able to hold `2^31 - 1` bytes? According to my investigation https://github.com/apache/arrow/blob/f9c070162acd87caf031723fb8d7e9c9a7317c0e/cpp/src/arrow/builder.h#L44 limits to `(2^31) - 1` was (Author: kszucs): What's the expected output? > ListArray has trouble with sizes greater than kMaximumCapacity > -- > > Key: ARROW-2367 > URL: https://issues.apache.org/jira/browse/ARROW-2367 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.9.0 >Reporter: Bryant Menn >Priority: Major > > When creating a Pandas dataframe with lists as elements as a column the > following error occurs when converting to a {{pyarrow.Table}} object. > {code} > Traceback (most recent call last): > File "arrow-2227.py", line 16, in > arr = pa.array(df['strings'], from_pandas=True) > File "array.pxi", line 177, in pyarrow.lib.array > File "error.pxi", line 77, in pyarrow.lib.check_status > File "error.pxi", line 77, in pyarrow.lib.check_status > pyarrow.lib.ArrowInvalid: BinaryArray cannot contain more than 2147483646 > bytes, have 2147483647 > {code} > The following code was used to generate the error (adapted from ARROW-2227): > {code} > import pandas as pd > import pyarrow as pa > # Commented lines were used to test non-binary data types, both cause the > same error > v1 = b'x' * 1 > v2 = b'x' * 147483646 > # v1 = 'x' * 1 > # v2 = 'x' * 147483646 > df = pd.DataFrame({ > 'strings': [[v1]] * 20 + [[v2]] + [[b'x']] > # 'strings': [[v1]] * 20 + [[v2]] + [['x']] > }) > arr = pa.array(df['strings'], from_pandas=True) > assert isinstance(arr, pa.ChunkedArray), type(arr) > {code} > Code was run using Python 3.6 with PyArrow installed from conda-forge on > macOS High Sierra. -- This message was sent by Atlassian JIRA (v7.6.3#76005)