comphead commented on code in PR #6721:
URL: https://github.com/apache/arrow-datafusion/pull/6721#discussion_r1235622262
##########
datafusion/execution/src/task.rs:
##########
@@ -138,7 +138,7 @@ impl FunctionRegistry for TaskContext {
let result = self.scalar_functions.get(name);
result.cloned().ok_or_else(|| {
- DataFusionError::Internal(format!(
+ DataFusionError::Plan(format!(
Review Comment:
prob we could have short methods
```
plan_err(text)
execution_err(text)
...
```
to replace wordy
```
DataFusionError::Plan(format!(
text
))
```
##########
datafusion/physical-expr/src/aggregate/utils.rs:
##########
@@ -60,25 +60,25 @@ pub fn calculate_result_decimal_for_avg(
if new_value >= target_min && new_value <= target_max {
Ok(ScalarValue::Decimal128(Some(new_value), *p, *s))
} else {
- Err(DataFusionError::Internal(
+ Err(DataFusionError::Execution(
"Arithmetic Overflow in
AvgAccumulator".to_string(),
))
}
} else {
// can't convert the lit decimal to the returned data type
- Err(DataFusionError::Internal(
+ Err(DataFusionError::Execution(
"Arithmetic Overflow in AvgAccumulator".to_string(),
))
}
} else {
// can't convert the lit decimal to the returned data type
- Err(DataFusionError::Internal(
+ Err(DataFusionError::Execution(
"Arithmetic Overflow in AvgAccumulator".to_string(),
))
}
}
other => Err(DataFusionError::Internal(format!(
Review Comment:
should be here Execution as well?
--
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]