Query support for IdentityType.PARTITION. Updated test cases.