[
https://issues.apache.org/jira/browse/PIG-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13528790#comment-13528790
]
Cheolsoo Park commented on PIG-3085:
------------------------------------
Hello Miyakawa,
Thank you very much for the patch! I have one comment:
{quote}
"Syntax" clause of LAST_INDEX_OF function is wrongly written as
LAST_INDEX_OF(expression), but the function actually takes three arguments
{quote}
Looking at source code, {{LAST_INDEX_OF}} takes only 2 args: string to be
searched and substring to search for. Inside the UDF,
{{string.lastIndexOf(substring)}} is called. In fact, this is inconsistent with
{{INDEXOF}} that takes the 3rd optional arg ({{fromIndex}}).
Can you please update the patch?
> Errors and lacks in document "Built In Functions"
> -------------------------------------------------
>
> Key: PIG-3085
> URL: https://issues.apache.org/jira/browse/PIG-3085
> Project: Pig
> Issue Type: Bug
> Components: documentation
> Affects Versions: 0.10.0
> Reporter: MIYAKAWA Taku
> Labels: documentation
> Attachments: PIG-3085.patch
>
>
> This is a patch to fix errors in document "Built In Functions".
> # Heading of the result table of ROUND function is wrongly written as
> ??CEIL\(x\)??
> # "Syntax" clause of LAST_INDEX_OF function is wrongly written as
> ??LAST_INDEX_OF(expression)??, but the function actually takes three arguments
> # "Syntax" clause of REGEX_EXTRACT_ALL function is wrongly written as
> ??REGEX_EXTRACT (string, regex)??
> # An example of REPLACE function is terminated by a semicolon:
> ??REPLACE(string,'software','wiki');??, but the semicolon is not necessary in
> Pig Latin syntax
> # "limit" argument of STRSPLIT function is described as ??The number of times
> the pattern ... is applied??. But actually, _limit-1_ is the maximum number
> of times the pattern is applied, and "limit" means the maximum length of the
> result tuple (if the value is positive). If the value is 0 or negative, not
> limit is applied.
> # An example program of TOP function does not work, because it uses
> ??COUNT(\*\)??
> # Updates links to pages in the Java API Reference
> # Fixes typos
> #* "COUNT_STAR is used -the- +to+ count ..."
> #* "delimit in JsonLoader or -JsonStorer- +JsonStorage+ ..."
> #* "using field -deliminters- +delimiters+ ..."
> #* "If you store -reading- +using+ delimiter "#" ..."
> #* "The STORE -function- +statement+ specifies that the files ..."
> #* "Limit" -> "limit" in a term definition of STRSPLIT function
--
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