AlenkaF edited a comment on pull request #12588:
URL: https://github.com/apache/arrow/pull/12588#issuecomment-1068904978
It looks like in case the strategy selects a timestamp that is out of range
(for example `datetime.datetime(1677, 9, 21, 1, 34, 43)`, out-of-bounds error
is raised. I can't find any info about the timestamp range in the docs though.
Will try to set the limit to the strategy to see if that is actually the
problem.
<details>
<summary>Failure output</summary>
<br>
Here is the failure output I get when running `pytest -r s -v -m hypothesis
--enable-hypothesis --hypothesis-profile=ci pyarrow` locally:
<br><br>
<pre>
```python
==========================================================================================================
FAILURES
===========================================================================================================
_____________________________________________________________________________________________________
test_record_batches
_____________________________________________________________________________________________________
@h.given(past.all_record_batches)
> def test_record_batches(record_bath):
pyarrow/tests/test_strategies.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyarrow/tests/strategies.py:338: in record_batches
children = [draw(arrays(field.type, size=rows)) for field in schema]
pyarrow/tests/strategies.py:338: in <listcomp>
children = [draw(arrays(field.type, size=rows)) for field in schema]
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/lazy.py:168:
in do_draw
return data.draw(self.wrapped_strategy)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/core.py:1430:
in do_draw
return self.definition(data.draw, *self.args, **self.kwargs)
pyarrow/tests/strategies.py:311: in arrays
return pa.array(draw(values), type=ty)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/lazy.py:168:
in do_draw
return data.draw(self.wrapped_strategy)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/collections.py:185:
in do_draw
result.append(data.draw(self.element_strategy))
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/strategies.py:651:
in do_draw
return data.draw(strategy)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/lazy.py:168:
in do_draw
return data.draw(self.wrapped_strategy)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/core.py:1430:
in do_draw
return self.definition(data.draw, *self.args, **self.kwargs)
pyarrow/tests/strategies.py:213: in _pylist
arr = draw(arrays(value_type, size=size, nullable=False))
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/lazy.py:168:
in do_draw
return data.draw(self.wrapped_strategy)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/internal/conjecture/data.py:879:
in draw
return strategy.do_draw(self)
../../pyarrow-dev-9/lib/python3.9/site-packages/hypothesis/strategies/_internal/core.py:1430:
in do_draw
return self.definition(data.draw, *self.args, **self.kwargs)
pyarrow/tests/strategies.py:311: in arrays
return pa.array(draw(values), type=ty)
pyarrow/array.pxi:316: in pyarrow.lib.array
return _sequence_to_array(obj, mask, size, type, pool, c_from_pandas)
pyarrow/array.pxi:39: in pyarrow.lib._sequence_to_array
chunked = GetResultValue(
pyarrow/error.pxi:143: in pyarrow.lib.pyarrow_internal_check_status
return check_status(status)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise ArrowInvalid(message)
E pyarrow.lib.ArrowInvalid: Could not convert datetime.datetime(1677, 9,
21, 1, 34, 43, tzinfo=<StaticTzInfo 'Etc/GMT-5'>) with type datetime.datetime:
out of bounds for nanosecond resolution
E
/Users/alenkafrim/repos/arrow/cpp/src/arrow/python/python_to_arrow.cc:640
PyValue::Convert(this->primitive_type_, this->options_, value)
E /Users/alenkafrim/repos/arrow/cpp/src/arrow/python/iterators.h:73
func(value, static_cast<int64_t>(i), &keep_going)
E
/Users/alenkafrim/repos/arrow/cpp/src/arrow/python/python_to_arrow.cc:1182
converter->Extend(seq, size)
```
</pre>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]