[SPARK-4318][SQL] Fix empty sum distinct.

Executing sum distinct for empty table throws `java.lang.UnsupportedOperationException: empty.reduceLeft`.
@marmbrus, I'd like to fix a mistake if I made, but I couldn't find what is wrong.
Could you let me know what to do here again?