Refactored the code/bucketing only on partial tables