fix Join needDistinct and add unit test
Merge pull request #78 from dcrissman/Join-NeedDistrict

fix Join needDistinct and add unit test