jorisvandenbossche commented on code in PR #14331:
URL: https://github.com/apache/arrow/pull/14331#discussion_r988765977


##########
python/pyarrow/tests/test_substrait.py:
##########
@@ -74,12 +76,22 @@ def test_run_serialized_query(tmpdir):
     """
 
     file_name = "read_data.arrow"
-    table = pa.table([[1, 2, 3, 4, 5]], names=['foo'])
+    table = pa.table([[1, 2, 3, 4, 5]], names=["foo"])
     path = _write_dummy_data_to_disk(tmpdir, file_name, table)
     query = tobytes(substrait_query.replace("FILENAME_PLACEHOLDER", path))
 
     buf = pa._substrait._parse_json_plan(query)
 
+    # Passing unsupported type, like int, will not segfault.
+    if input_type == "unsupported":
+        with pytest.raises(TypeError, match="No matching signature found"):
+            substrait.run_query(1)
+        return

Review Comment:
   Since this part doesn't use anything of the rest of the test (it doesn't 
require any of the variables that is set up above), I would personally just put 
this in its own test instead of relying on parametrization



-- 
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]

Reply via email to