@Udf(description = "Returns the portion of str from pos to the end of str")
  public String substring(
      @UdfParameter(description = "The source string.") final String str,
      @UdfParameter(description = "The base-one position to start from.") final Integer pos
  ) {
    if (str == null || pos == null) {
      return null;
    }
    final int start = getStartIndex(str.length(), pos);
    return str.substring(start);
  }
@Test
  public void shouldUseOneBasedIndexingOnBytes() {
    assertThat(udf.substring(ByteBuffer.wrap(new byte[]{1,2,3,4}), 1, 1),
        is(ByteBuffer.wrap(new byte[]{1})));
    assertThat(udf.substring(ByteBuffer.wrap(new byte[]{1,2,3,4}), -1, 1),
        is(ByteBuffer.wrap(new byte[]{4})));
  }