You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/08/27 15:33:04 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #8044: ARROW-7663: [Python] Raise better error message when passing mixed-type (int/string) Pandas dataframe to pyarrow Table

jorisvandenbossche commented on a change in pull request #8044:
URL: https://github.com/apache/arrow/pull/8044#discussion_r478505587



##########
File path: python/pyarrow/tests/test_pandas.py
##########
@@ -3531,11 +3533,11 @@ def test_dictionary_from_pandas_specified_type():
     assert result.type.equals(typ)
     assert result.to_pylist() == ['a', 'b']
 
-    # mismatching values type -> raise error (for now a deprecation warning)
+    # mismatching values type -> raise error
     typ = pa.dictionary(index_type=pa.int8(), value_type=pa.int64())
-    with pytest.warns(FutureWarning):
+    with pytest.raises(pa.ArrowInvalid):
         result = pa.array(cat, type=typ)
-    assert result.to_pylist() == ['a', 'b']
+    assert result.to_pylist() == ["a", "b"]

Review comment:
       this line can be removed now? (it's actually testing again the `result` of the previous case above)

##########
File path: python/pyarrow/tests/test_convert_builtin.py
##########
@@ -382,11 +382,8 @@ def test_sequence_custom_integers(seq):
 @parametrize_with_iterable_types
 def test_broken_integers(seq):

Review comment:
       I think that is fine, personally

##########
File path: python/pyarrow/tests/test_compute.py
##########
@@ -562,7 +562,7 @@ def test_is_null():
 def test_fill_null():
     arr = pa.array([1, 2, None, 4], type=pa.int8())
     fill_value = pa.array([5], type=pa.int8())
-    with pytest.raises(TypeError):
+    with pytest.raises(pa.ArrowInvalid):

Review comment:
       What did the error message say before, and what does it show now?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org