Antoine Pitrou created ARROW-2033: ------------------------------------- Summary: pa.array() doesn't work with iterators Key: ARROW-2033 URL: https://issues.apache.org/jira/browse/ARROW-2033 Project: Apache Arrow Issue Type: Bug Components: Python Affects Versions: 0.9.0 Reporter: Antoine Pitrou
pa.array handles iterables fine, but not iterators if size isn't passed: {code:java} >>> arr = pa.array(range(5)) >>> arr <pyarrow.lib.Int64Array object at 0x7f4652a05318> [ 0, 1, 2, 3, 4 ] >>> arr = pa.array(iter(range(5))) >>> arr <pyarrow.lib.NullArray object at 0x7f4633c1d638> [ NA, NA, NA, NA, NA ] {code} This is because InferArrowSize() first exhausts the iterator. -- This message was sent by Atlassian JIRA (v7.6.3#76005)