Adding delete_by_key function to complete partitioning by key feature.