From 1a3a0bcd8885d005a92611617b91e87b207e7522 Mon Sep 17 00:00:00 2001 From: Yilin Chen Date: Wed, 29 May 2019 16:09:11 +0800 Subject: [PATCH] Update with new parse interface Signed-off-by: Yilin Chen --- src/coprocessor/dag/aggr_fn/impl_first.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/coprocessor/dag/aggr_fn/impl_first.rs b/src/coprocessor/dag/aggr_fn/impl_first.rs index bc197855deaf..361bd498fed5 100644 --- a/src/coprocessor/dag/aggr_fn/impl_first.rs +++ b/src/coprocessor/dag/aggr_fn/impl_first.rs @@ -18,24 +18,14 @@ pub struct AggrFnDefinitionParserFirst; impl super::AggrDefinitionParser for AggrFnDefinitionParserFirst { fn check_supported(&self, aggr_def: &Expr) -> Result<()> { assert_eq!(aggr_def.get_tp(), ExprType::First); - if aggr_def.get_children().len() != 1 { - return Err(box_err!( - "Expect 1 parameter, but got {}", - aggr_def.get_children().len() - )); - } - - // Check whether parameter expression is supported. - RpnExpressionBuilder::check_expr_tree_supported(&aggr_def.get_children()[0])?; - - Ok(()) + super::util::check_aggr_exp_supported_one_child(aggr_def) } fn parse( &self, mut aggr_def: Expr, time_zone: &Tz, - max_columns: usize, + _src_schema: &[FieldType], out_schema: &mut Vec, out_exp: &mut Vec, ) -> Result> {