code: @ScalarFunction(value = "like", hidden = true)
      @LiteralParameters("x")
      @SqlType(StandardTypes.BOOLEAN)
      public static boolean likeVarchar(@SqlType("varchar(x)") Slice value, @SqlType(LikePatternType.NAME) Regex pattern)
      {
          // Joni can infinite loop with UTF8Encoding when invalid UTF-8 is encountered.
          // NonStrictUTF8Encoding must be used to avoid this issue.
          byte[] bytes = value.getBytes();
          return regexMatches(pattern, bytes);
      }
docs: TODO: this should not be callable from SQL