Skip to content

Commit 5da8ae8

Browse files
committed
ARROW-6067: [Python] Fix failing large memory Python tests
We should arrange to run the large memory tests on a regular basis (in https://ci.ursalabs.org/?) so we don't allow such failures to pass silently. Closes apache#5128 from wesm/ARROW-6067 and squashes the following commits: d484105 <Wes McKinney> Fix large memory Python tests Authored-by: Wes McKinney <wesm+git@apache.org> Signed-off-by: Wes McKinney <wesm+git@apache.org>
1 parent 721e6f9 commit 5da8ae8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

python/pyarrow/feather.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ def read_pandas(self, columns=None, use_threads=True):
5858
use_threads=use_threads)
5959

6060

61-
def check_chunked_overflow(col):
61+
def check_chunked_overflow(name, col):
6262
if col.num_chunks == 1:
6363
return
6464

6565
if col.type in (ext.binary(), ext.string()):
6666
raise ValueError("Column '{0}' exceeds 2GB maximum capacity of "
6767
"a Feather binary column. This restriction may be "
68-
"lifted in the future".format(col.name))
68+
"lifted in the future".format(name))
6969
else:
7070
# TODO(wesm): Not sure when else this might be reached
7171
raise ValueError("Column '{0}' of type {1} was chunked on conversion "
7272
"to Arrow and cannot be currently written to "
73-
"Feather format".format(col.name, str(col.type)))
73+
"Feather format".format(name, str(col.type)))
7474

7575

7676
class FeatherWriter(object):
@@ -93,7 +93,7 @@ def write(self, df):
9393
table = Table.from_pandas(df, preserve_index=False)
9494
for i, name in enumerate(table.schema.names):
9595
col = table[i]
96-
check_chunked_overflow(col)
96+
check_chunked_overflow(name, col)
9797
self.writer.write_array(name, col.chunk(0))
9898

9999
self.writer.close()

python/pyarrow/tests/test_pandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,7 +2005,7 @@ def test_from_numpy_large(self):
20052005
data['x'][data['x'] < 0.2] = np.nan
20062006

20072007
ty = pa.struct([pa.field('x', pa.float64()),
2008-
pa.field('y', pa.binary(bs))])
2008+
pa.field('y', pa.binary())])
20092009
arr = pa.array(data, type=ty, from_pandas=True)
20102010
assert arr.num_chunks == 2
20112011

0 commit comments

Comments
 (0)