wjones127 commented on code in PR #14331:
URL: https://github.com/apache/arrow/pull/14331#discussion_r989192063
##########
python/pyarrow/tests/test_substrait.py:
##########
@@ -86,6 +86,22 @@ def test_run_serialized_query(tmpdir):
assert table.select(["foo"]) == res_tb.select(["foo"])
[email protected]("query", (pa.py_buffer(b'buffer'), b"bytes", 1))
+def test_run_query_input_types(tmpdir, query):
+
+ # Passing unsupported type, like int, will not segfault.
+ if not any(isinstance(query, c) for c in (pa.Buffer, bytes)):
Review Comment:
FYI you can pass a tuple to check if the object matches any of the types:
```suggestion
if not isinstance(query, (pa.Buffer, bytes)):
```
https://docs.python.org/3.6/library/functions.html#isinstance
--
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]