1fanwang commented on code in PR #51161:
URL: https://github.com/apache/arrow/pull/51161#discussion_r4564608372
##########
python/pyarrow/tests/test_misc.py:
##########
@@ -290,3 +292,28 @@ def test_extension_type_constructor_errors(klass):
msg = f"Do not call {klass.__name__}'s constructor directly, use .*
instead."
with pytest.raises(TypeError, match=msg):
klass()
+
+
[email protected](("module", "construct", "message"), [
+ pytest.param(
+ "acero", lambda mod: mod.ScanNodeOptions(None), "Argument 'dataset'",
+ marks=[pytest.mark.acero, pytest.mark.dataset], id="scan"),
+ pytest.param(
+ "acero", lambda mod: mod.ProjectNodeOptions([None]),
+ "Expression must not be None", marks=pytest.mark.acero, id="project"),
+ pytest.param(
+ "parquet", lambda mod: mod.ParquetSchema(None), "Argument 'container'",
+ marks=pytest.mark.parquet, id="parquet-schema"),
+ pytest.param(
+ "parquet", lambda mod: mod.ColumnSchema(None, 0), "Argument 'schema'",
+ marks=pytest.mark.parquet, id="column-schema"),
+ pytest.param(
+ "fs", lambda mod: mod.SubTreeFileSystem("", None), "Argument
'base_fs'",
+ id="subtree"),
+])
+def test_required_arrow_objects_reject_none_without_crashing(
Review Comment:
Done in
https://github.com/apache/arrow/commit/194044105648ac833e7abd3b98e11ad574775b8b.
The checks now sit in test_acero.py, test_metadata.py and test_fs.py.
##########
python/pyarrow/tests/test_array.py:
##########
@@ -820,6 +823,20 @@ def test_string_binary_from_buffers():
assert copied.null_count == 0
[email protected]("array_type", [pa.StringArray, pa.LargeStringArray])
+def test_string_from_buffers_null_buffers(array_type):
Review Comment:
You're not missing anything: it covered string constructors that this PR
doesn't change, so I removed it in
https://github.com/apache/arrow/commit/194044105648ac833e7abd3b98e11ad574775b8b.
--
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]