[
https://issues.apache.org/jira/browse/PIG-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Hitchcock updated PIG-1565:
----------------------------------
Attachment: PIG-1565-1.patch
This patch provides a number of UDFs written by the Amazon Elastic MapReduce
team that we feel are useful.
A few of these UDFs are duplicates of existing functionality. I am including
them because they are consistent with the rest of the UDFs in this patch and
because I'd like to start a discussion about the best way to include these
UDFs. Here is a list of what I believe to be duplicate UDFs:
INDEX_OF
LAST_INDEX_OF
SPLIT_ON_REGEX
Here are descriptions of the provided UDFs.
datetime/
These are based on JodaTime and provide a similar model for date handling.
DATE_TIME
A function that returns a DateTime String, of the form
yyyy-MM-dd'T'HH:mm:ss.SSSZZ.
DURATION
A function that returns a Duration as a long. A duration is a length of time
specified in milliseconds.
EXTRACT_DT
Extracts the integer numeric value of a field of a LocalDate, LocalTime,
DateTime, Period or Duration.
FORMAT_DT
Formats a LocalDate, LocalTime or DateTime given a format string into a string.
LOCAL_DATE
A function that returns a LocalDate String, of the form yyyy-MM-dd.
LOCAL_TIME
A function that returns a LocalTime String, of the form HH:mm:ss.SSS.
OFFSET_DT
Offsets a LocalDate, LocalTime or DateTime by a Period/Duration, returning an
object of the same type.
PERIOD
A function that returns a Period String. A Period is specified in terms of
individual duration fields such as years and days.
string/
String handling functions modeled after Apache Commons StringUtils.
CAPITALIZE
Capitalizes a String changing the first letter to upper case.
CENTER
Centers a String in a larger String
CONCAT_WITH
Joins the arguments with String joiner.
EXTRACT
Parses input String with a regular expression, and returns all matches groups.
FORMAT
Formats a list of arguments into a single String
INDEX_OF
Finds the first index within a String, from a optional start position,
handling null
LAST_INDEX_OF
Finds the last index within a String, from a optional start position, handling
null
LEFT_PAD
Left pads a string to one of size size.
REPEAT
Repeat a String repeat times to form a new String.
REPLACE_ONCE
Replaces a String with another String inside a larger String, once.
RIGHT_PAD
Right pads a string to one of size size.
SPLIT_ON_REGEX
Splits this string around matches of the given regular expression.
STRIP
Strips any of a set of characters from the start and end of a String.
STRIP_END
Strips any of a set of characters from the start of a String.
STRIP_START
Strips any of a set of characters from the start of a String.
SWAP_CASE
Swaps the case of a String changing upper and title case to lower case, and
lower case to upper case.
> additional piggybank datetime and string UDFs
> ---------------------------------------------
>
> Key: PIG-1565
> URL: https://issues.apache.org/jira/browse/PIG-1565
> Project: Pig
> Issue Type: Improvement
> Reporter: Andrew Hitchcock
> Attachments: PIG-1565-1.patch
>
>
> Pig is missing a variety of UDFs that might be helpful for users implementing
> Pig scripts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.