#include #include #include #include #include #include #include namespace DB { struct Settings; namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_ARGUMENT; extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; extern const int BAD_ARGUMENTS; } namespace { /// TODO Proper support for Decimal256. template struct MovingSum { using Data = MovingSumData, Decimal128, NearestFieldType>>; using Function = MovingImpl; }; template struct MovingAvg { using Data = MovingAvgData, Decimal128, Float64>>; using Function = MovingImpl; }; template using MovingSumTemplate = typename MovingSum::Function; template using MovingAvgTemplate = typename MovingAvg::Function; template