Skip to content

Commit 79f271f

Browse files
committed
resolve comment
1 parent 80174e3 commit 79f271f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

datafusion/proto/src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use datafusion_common::DataFusionError;
1919

20-
pub fn byte_to_string(b: u8) -> Result<String, DataFusionError> {
20+
pub fn csv_delimiter_to_string(b: u8) -> Result<String, DataFusionError> {
2121
let b = &[b];
2222
let b = std::str::from_utf8(b)
2323
.map_err(|_| DataFusionError::Internal("Invalid CSV delimiter".to_owned()))?;

datafusion/proto/src/physical_plan/from_proto.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ pub(crate) fn parse_physical_expr(
9696
input_schema,
9797
)?),
9898
ExprType::AggregateExpr(_) => {
99-
return Err(DataFusionError::Internal(
99+
return Err(DataFusionError::NotImplemented(
100100
"Cannot convert aggregate expr node to physical expression".to_owned(),
101101
));
102102
}
103103
ExprType::WindowExpr(_) => {
104-
return Err(DataFusionError::Internal(
104+
return Err(DataFusionError::NotImplemented(
105105
"Cannot convert window expr node to physical expression".to_owned(),
106106
));
107107
}
108108
ExprType::Sort(_) => {
109-
return Err(DataFusionError::Internal(
109+
return Err(DataFusionError::NotImplemented(
110110
"Cannot convert sort expr node to physical expression".to_owned(),
111111
));
112112
}

datafusion/proto/src/physical_plan/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use prost::bytes::BufMut;
5858
use prost::Message;
5959

6060
use crate::common::proto_error;
61-
use crate::common::{byte_to_string, str_to_byte};
61+
use crate::common::{csv_delimiter_to_string, str_to_byte};
6262
use crate::from_proto::parse_expr;
6363
use crate::physical_plan::from_proto::parse_physical_expr;
6464
use crate::protobuf::physical_expr_node::ExprType;
@@ -946,7 +946,7 @@ impl AsExecutionPlan for PhysicalPlanNode {
946946
protobuf::CsvScanExecNode {
947947
base_conf: Some(exec.base_config().try_into()?),
948948
has_header: exec.has_header(),
949-
delimiter: byte_to_string(exec.delimiter())?,
949+
delimiter: csv_delimiter_to_string(exec.delimiter())?,
950950
},
951951
)),
952952
})

0 commit comments

Comments
 (0)