Error Message
ERROR: Site node0 got error: Too many groups. See log for more errors.
Explanation
Vertica transforms DISTINCT into GROUP BY, which must fit in memory. The error indicates that there is not enough free memory.
Workaround
Add memory to your cluster.