Skip to content

Commit

Permalink
Fixes doc test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsherin committed Sep 17, 2024
1 parent ce7df3a commit bb57f8f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions datafusion/expr/src/udwf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ where
/// fn as_any(&self) -> &dyn Any { self }
/// fn name(&self) -> &str { "smooth_it" }
/// fn signature(&self) -> &Signature { &self.signature }
/// fn return_type(&self, args: &[DataType]) -> Result<DataType> {
/// if !matches!(args.get(0), Some(&DataType::Int32)) {
/// return plan_err!("smooth_it only accepts Int32 arguments");
/// }
/// Ok(DataType::Int32)
/// }
/// // The actual implementation would add one to the argument
/// fn partition_evaluator(&self) -> Result<Box<dyn PartitionEvaluator>> { unimplemented!() }
/// fn field(&self, field_args: WindowUDFFieldArgs) -> Result<Field> { unimplemented!() }
/// fn field(&self, field_args: WindowUDFFieldArgs) -> Result<Field> {
/// if let Some(DataType::Int32) = field_args.get_input_type(0) {
/// Ok(Field::new(field_args.name(), DataType::Int32, false))
/// } else {
/// plan_err!("smooth_it only accepts Int32 arguments")
/// }
/// }
/// }
///
/// // Create a new WindowUDF from the implementation
Expand Down

0 comments on commit bb57f8f

Please sign in to comment.