This is an automated email from the ASF dual-hosted git repository.

jayzhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 088ad010a6 Chore: clean up udwf example && remove edundant import 
(#10718)
088ad010a6 is described below

commit 088ad010a6ceaa6a2e810d418a2370e45acf3d54
Author: junxiangMu <[email protected]>
AuthorDate: Thu May 30 01:08:14 2024 -0400

    Chore: clean up udwf example && remove edundant import (#10718)
    
    Signed-off-by: guojidan <[email protected]>
---
 datafusion-examples/examples/simplify_udwf_expression.rs | 12 ------------
 datafusion/proto-common/src/to_proto/mod.rs              |  2 --
 2 files changed, 14 deletions(-)

diff --git a/datafusion-examples/examples/simplify_udwf_expression.rs 
b/datafusion-examples/examples/simplify_udwf_expression.rs
index 2824d03761..4e8d03c38e 100644
--- a/datafusion-examples/examples/simplify_udwf_expression.rs
+++ b/datafusion-examples/examples/simplify_udwf_expression.rs
@@ -68,18 +68,6 @@ impl WindowUDFImpl for SimplifySmoothItUdf {
 
     /// this function will simplify `SimplifySmoothItUdf` to `SmoothItUdf`.
     fn simplify(&self) -> Option<WindowFunctionSimplification> {
-        // Ok(ExprSimplifyResult::Simplified(Expr::WindowFunction(
-        //     WindowFunction {
-        //         fun: 
datafusion_expr::WindowFunctionDefinition::AggregateFunction(
-        //             AggregateFunction::Avg,
-        //         ),
-        //         args,
-        //         partition_by: partition_by.to_vec(),
-        //         order_by: order_by.to_vec(),
-        //         window_frame: window_frame.clone(),
-        //         null_treatment: *null_treatment,
-        //     },
-        // )))
         let simplify = |window_function: datafusion_expr::expr::WindowFunction,
                         _: &dyn SimplifyInfo| {
             Ok(Expr::WindowFunction(WindowFunction {
diff --git a/datafusion/proto-common/src/to_proto/mod.rs 
b/datafusion/proto-common/src/to_proto/mod.rs
index e53604fc74..f160bc40af 100644
--- a/datafusion/proto-common/src/to_proto/mod.rs
+++ b/datafusion/proto-common/src/to_proto/mod.rs
@@ -289,8 +289,6 @@ impl TryFrom<&ScalarValue> for protobuf::ScalarValue {
     type Error = Error;
 
     fn try_from(val: &ScalarValue) -> Result<Self, Self::Error> {
-        use protobuf::scalar_value::Value;
-
         let data_type = val.data_type();
         match val {
             ScalarValue::Boolean(val) => {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to