fix wrong column in identical join
remove all sample columns except n_sample and n_na_sample, fix group by issues and some test cases