Skip to content

Commit 088ad01

Browse files
authored
Chore: clean up udwf example && remove edundant import (#10718)
Signed-off-by: guojidan <[email protected]>
1 parent 3d00760 commit 088ad01

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

datafusion-examples/examples/simplify_udwf_expression.rs

-12
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,6 @@ impl WindowUDFImpl for SimplifySmoothItUdf {
6868

6969
/// this function will simplify `SimplifySmoothItUdf` to `SmoothItUdf`.
7070
fn simplify(&self) -> Option<WindowFunctionSimplification> {
71-
// Ok(ExprSimplifyResult::Simplified(Expr::WindowFunction(
72-
// WindowFunction {
73-
// fun: datafusion_expr::WindowFunctionDefinition::AggregateFunction(
74-
// AggregateFunction::Avg,
75-
// ),
76-
// args,
77-
// partition_by: partition_by.to_vec(),
78-
// order_by: order_by.to_vec(),
79-
// window_frame: window_frame.clone(),
80-
// null_treatment: *null_treatment,
81-
// },
82-
// )))
8371
let simplify = |window_function: datafusion_expr::expr::WindowFunction,
8472
_: &dyn SimplifyInfo| {
8573
Ok(Expr::WindowFunction(WindowFunction {

datafusion/proto-common/src/to_proto/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,6 @@ impl TryFrom<&ScalarValue> for protobuf::ScalarValue {
289289
type Error = Error;
290290

291291
fn try_from(val: &ScalarValue) -> Result<Self, Self::Error> {
292-
use protobuf::scalar_value::Value;
293-
294292
let data_type = val.data_type();
295293
match val {
296294
ScalarValue::Boolean(val) => {

0 commit comments

Comments
 (0)