v.21.3Bug Fix

Fix -Distinct and -State Combinators in Aggregate Functions

Fix usage of -Distinct combinator with -State combinator in aggregate functions. #20866 (Anton Popov).