class Chr {

  @Udf
  public String chr(@UdfParameter(
      description = "Decimal codepoint") final Integer decimalCode) {
    if (decimalCode == null) {
      return null;
    }
    if (!Character.isValidCodePoint(decimalCode)) {
      return null;
    }
    final char[] resultChars = Character.toChars(decimalCode.intValue());
    return String.valueOf(resultChars);
  }

}