[
https://issues.apache.org/jira/browse/PIG-2880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467054#comment-13467054
]
Dmitriy V. Ryaboy commented on PIG-2880:
----------------------------------------
Isn't this just a special case of substring?
If you do feel strongly that this is a useful udf, I would like to suggest a
couple of improvements:
* use PrimitiveEvalFunc<String, String> instead of EvalFunc. It'll take care of
null or empty inputs, etc, which the UDF you proposed will blow up on.
* why add an empty string to a char? String.valueOf is quite a bit more
efficient.
> Pig current releases lack a UDF charAt.This UDF returns the char value at the
> specified index.
> ----------------------------------------------------------------------------------------------
>
> Key: PIG-2880
> URL: https://issues.apache.org/jira/browse/PIG-2880
> Project: Pig
> Issue Type: New Feature
> Components: piggybank
> Affects Versions: 0.10.0
> Reporter: Sabir Ayappalli
>
> Pig current releases lack a UDF charAt.This UDF returns the char value at the
> specified index. An index ranges from 0 to length() - 1. The first char value
> of the sequence is at index 0, the next at index 1, and so on.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira