@SuppressWarnings({"unchecked", "rawtypes"}) // this is dynamic, don't have concrete classes for the TypeSpec
public ComplexKeySpec<?, ?> toComplexKey(DataSchema keyDataSchema, DataSchema paramsDataSchema)
{
TypeSpec<? extends RecordTemplate> complexKeyKey = toRecordTemplateType(keyDataSchema);
TypeSpec<? extends RecordTemplate> complexKeyParams = toRecordTemplateType(paramsDataSchema);
return new ComplexKeySpec(complexKeyKey, complexKeyParams);
}