class Reinterpreter {

  public BeamSqlPrimitive convert(SqlTypeName to, BeamSqlPrimitive value) {
    Optional<ReinterpretConversion> conversion = getConversion(value.getOutputType(), to);
    if (!conversion.isPresent()) {
      throw new UnsupportedOperationException(
          "Unsupported conversion: " + value.getOutputType().name() + "->" + to.name());
    }

    return conversion.get().convert(value);
  }

  private  Reinterpreter(Builder builder);

}