Skip to content

Commit

Permalink
Chore: clean up udwf example && remove edundant import (#10718)
Browse files Browse the repository at this point in the history
Signed-off-by: guojidan <[email protected]>
  • Loading branch information
guojidan authored May 30, 2024
1 parent 3d00760 commit 088ad01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
12 changes: 0 additions & 12 deletions datafusion-examples/examples/simplify_udwf_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions datafusion/proto-common/src/to_proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 088ad01

Please sign in to comment.