fix serialization error with count(distinct long_col)