This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 7d1cf9174c minor: change some plan_err to exec_err (#7996)
7d1cf9174c is described below
commit 7d1cf9174c7b92af38e732cfafdd67acb243a5c3
Author: Ruihang Xia <[email protected]>
AuthorDate: Thu Nov 2 00:19:17 2023 +0800
minor: change some plan_err to exec_err (#7996)
* minor: change some plan_err to exec_err
Signed-off-by: Ruihang Xia <[email protected]>
* change unreachable code to internal error
Signed-off-by: Ruihang Xia <[email protected]>
---------
Signed-off-by: Ruihang Xia <[email protected]>
---
datafusion/physical-expr/src/expressions/column.rs | 3 +--
datafusion/physical-expr/src/expressions/no_op.rs | 4 ++--
datafusion/physical-expr/src/sort_expr.rs | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/datafusion/physical-expr/src/expressions/column.rs
b/datafusion/physical-expr/src/expressions/column.rs
index b7b5895db6..62da8ff9ed 100644
--- a/datafusion/physical-expr/src/expressions/column.rs
+++ b/datafusion/physical-expr/src/expressions/column.rs
@@ -28,7 +28,6 @@ use arrow::{
datatypes::{DataType, Schema},
record_batch::RecordBatch,
};
-use datafusion_common::plan_err;
use datafusion_common::{internal_err, DataFusionError, Result};
use datafusion_expr::ColumnarValue;
@@ -176,7 +175,7 @@ impl PhysicalExpr for UnKnownColumn {
/// Evaluate the expression
fn evaluate(&self, _batch: &RecordBatch) -> Result<ColumnarValue> {
- plan_err!("UnKnownColumn::evaluate() should not be called")
+ internal_err!("UnKnownColumn::evaluate() should not be called")
}
fn children(&self) -> Vec<Arc<dyn PhysicalExpr>> {
diff --git a/datafusion/physical-expr/src/expressions/no_op.rs
b/datafusion/physical-expr/src/expressions/no_op.rs
index 497fb42fe4..95e6879a6c 100644
--- a/datafusion/physical-expr/src/expressions/no_op.rs
+++ b/datafusion/physical-expr/src/expressions/no_op.rs
@@ -28,7 +28,7 @@ use arrow::{
use crate::physical_expr::down_cast_any_ref;
use crate::PhysicalExpr;
-use datafusion_common::{plan_err, DataFusionError, Result};
+use datafusion_common::{internal_err, DataFusionError, Result};
use datafusion_expr::ColumnarValue;
/// A place holder expression, can not be evaluated.
@@ -65,7 +65,7 @@ impl PhysicalExpr for NoOp {
}
fn evaluate(&self, _batch: &RecordBatch) -> Result<ColumnarValue> {
- plan_err!("NoOp::evaluate() should not be called")
+ internal_err!("NoOp::evaluate() should not be called")
}
fn children(&self) -> Vec<Arc<dyn PhysicalExpr>> {
diff --git a/datafusion/physical-expr/src/sort_expr.rs
b/datafusion/physical-expr/src/sort_expr.rs
index 74179ba594..3b3221289d 100644
--- a/datafusion/physical-expr/src/sort_expr.rs
+++ b/datafusion/physical-expr/src/sort_expr.rs
@@ -25,7 +25,7 @@ use crate::PhysicalExpr;
use arrow::compute::kernels::sort::{SortColumn, SortOptions};
use arrow::record_batch::RecordBatch;
-use datafusion_common::plan_err;
+use datafusion_common::exec_err;
use datafusion_common::{DataFusionError, Result};
use datafusion_expr::ColumnarValue;
@@ -66,7 +66,7 @@ impl PhysicalSortExpr {
let array_to_sort = match value_to_sort {
ColumnarValue::Array(array) => array,
ColumnarValue::Scalar(scalar) => {
- return plan_err!(
+ return exec_err!(
"Sort operation is not applicable to scalar value {scalar}"
);
}