Function tidb_query_aggr::util::rewrite_exp_for_sum_avg [−][src]
pub fn rewrite_exp_for_sum_avg(
schema: &[FieldType],
exp: &mut RpnExpression
) -> Result<()>
Rewrites the expression to insert necessary cast functions for SUM and AVG aggregate functions.
See typeInfer4Sum
and typeInfer4Avg
in TiDB.
TODO: This logic should be performed by TiDB.