FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve displayed error by using `DataFusionError`'s `Display` trait by abey79 · Pull Request #1370 · apache/datafusion-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .rs  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion python/tests/test_indexing.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_err(df):
with pytest.raises(Exception) as e_info:
df["c"]

for e in ["SchemaError", "FieldNotFound", 'name: "c"']:
for e in ["Schema error", "No field named c"]:
assert e in e_info.value.args[0]

with pytest.raises(Exception) as e_info:
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_udf.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ def non_nullable_abs(input_col):

with pytest.raises(Exception) as e_info:
_results = df_result.collect()
assert "InvalidArgumentError" in str(e_info)
assert "Invalid argument error" in str(e_info)
2 changes: 1 addition & 1 deletion src/errors.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub enum PyDataFusionError {
impl fmt::Display for PyDataFusionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
PyDataFusionError::ExecutionError(e) => write!(f, "DataFusion error: {e:?}"),
PyDataFusionError::ExecutionError(e) => write!(f, "DataFusion error: {e}"),
PyDataFusionError::ArrowError(e) => write!(f, "Arrow error: {e:?}"),
PyDataFusionError::PythonError(e) => write!(f, "Python error {e:?}"),
PyDataFusionError::Common(e) => write!(f, "{e}"),
Expand Down

Back | FazBrowse Home | New Git URL