use all variables when none is specified in distinct_impl