File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1053,7 +1053,7 @@ def _read_pandas(
1053
1053
try :
1054
1054
return self ._read_pandas_load_job (pandas_dataframe , api_name )
1055
1055
except pa .ArrowInvalid as e :
1056
- raise pa .ArrowInvalid (f"Unsupported dtype : `{ e } `. " )
1056
+ raise pa .ArrowInvalid (f"Could not convert with a BigQuery type : `{ e } `. " ) from e
1057
1057
1058
1058
def _read_pandas_inline (
1059
1059
self , pandas_dataframe : pandas .DataFrame
@@ -1068,7 +1068,7 @@ def _read_pandas_inline(
1068
1068
blocks .Block .from_local (pandas_dataframe , self )
1069
1069
)
1070
1070
except pa .ArrowInvalid as e :
1071
- raise pa .ArrowInvalid (f"Unsupported dtype : `{ e } `. " )
1071
+ raise pa .ArrowInvalid (f"Could not convert with a BigQuery type : `{ e } `. " ) from e
1072
1072
except ValueError : # Thrown by ibis for some unhandled types
1073
1073
return None
1074
1074
except pa .ArrowTypeError : # Thrown by arrow for types without mapping (geo).
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ def test_read_pandas_index(session):
438
438
439
439
440
440
def test_read_pandas_w_unsupported_mixed_dtype (session ):
441
- with pytest .raises (pa .ArrowInvalid , match = "Unsupported dtype " ):
441
+ with pytest .raises (pa .ArrowInvalid , match = "Could not convert " ):
442
442
session .read_pandas (pd .DataFrame ({"a" : [1 , "hello" ]}))
443
443
444
444
You can’t perform that action at this time.
0 commit comments