class UrlDecodeParam {

  @Udf
  public String decodeParam(
      @UdfParameter(description = "the value to decode") final String input) {
    try {
      return URLDecoder.decode(input, UTF_8.name());
    } catch (final UnsupportedEncodingException e) {
      throw new KsqlFunctionException(
          "url_decode udf encountered an encoding exception while decoding: " + input, e);
    }
  }

}