script::python::rspython::builtins

Macro bind_aggr_fn

source
macro_rules! bind_aggr_fn {
    ($AGGR_FUNC: ident, $VM: ident, $ARGS:expr, $DATA_TYPE: expr $(, $EXPR_ARGS: ident)*) => { ... };
}
Expand description

The macro for binding function in datafusion_physical_expr::expressions(most of them are aggregate function)

  • first arguments is the name of datafusion expression function like Avg
  • second is the python virtual machine ident vm
  • following is the actual args passing in(as a slice).i.e.&[values.to_arrow_array()]
  • the data type of passing in args, i.e: Datatype::Float64
  • lastly ARE names given to expr of those function, i.e. expr0, expr1,….