datafusion-comet
datafusion-comet copied to clipboard
Remove "Execution error: " prefix from error messages from Rust
What is the problem the feature request solves?
We cannot exactly match Spark error messages in some cases because DataFusion is prefixing errors from Rust with "Execution error: ".
Because we are ultimately implementing traits from DataFusion, any CometError
s we create get converted into DataFusion errors:
impl From<CometError> for DataFusionError {
fn from(value: CometError) -> Self {
match value {
CometError::DataFusion { source } => source,
_ => DataFusionError::Execution(value.to_string()),
}
}
}
In errors.rs
we use thiserror for formatting errors and we delegate formatting to DataFusion for DataFusionError
:
#[error(transparent)]
DataFusion {
#[from]
source: DataFusionError,
},
DataFusion adds an "Execution error: " prefix in its formatting:
DataFusionError::Execution(ref desc) => {
write!(f, "Execution error: {desc}")
}
Describe the potential solution
There seem to be two options:
- Add a new variant to DataFusionError which does not do any additional formatting and just returns the underlying error string
- Find a work around in the mapping using thiserror
Additional context
No response