Updated the partitioner and test code to handle different types of data