public static SamzaSqlRelRecord createSamzaSqlCompositeKey(SamzaSqlRelMessage message, List<Integer> keyValueIdx,
      List<String> keyPartNames) {
    Validate.isTrue(keyValueIdx.size() == keyPartNames.size(), "Key part name and value list sizes are different");
    ArrayList<Object> keyPartValues = new ArrayList<>();
    for (int idx : keyValueIdx) {
      keyPartValues.add(message.getSamzaSqlRelRecord().getFieldValues().get(idx));
    }
    return new SamzaSqlRelRecord(keyPartNames, keyPartValues);
  }
Create composite key from the rel message.
@param message Represents the samza sql rel message to extract the key values from.
@param keyValueIdx list of key values in the form of field indices within the rel message.
@param keyPartNames Represents the key field names.
@return the composite key of the rel message
samza-sql/src/main/java/org/apache/samza/sql/data/SamzaSqlRelMessage.java