hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/LanguageManual/UDF" by JohnSichi
Date Fri, 17 Sep 2010 20:47:41 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/LanguageManual/UDF" page has been changed by JohnSichi.
http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF?action=diff&rev1=53&rev2=54

--------------------------------------------------

  ||string ||ascii(string str) ||Returns the numeric value of the first character of str ||
  ||string ||lpad(string str, int len, string pad) ||Returns str, left-padded with pad to
a length of len ||
  ||string ||rpad(string str, int len, string pad) ||Returns str, right-padded with pad to
a length of len ||
- ||list ||split(string str, string pat) ||Split str around pat (pat is a regular expression)
||
+ ||array ||split(string str, string pat) ||Split str around pat (pat is a regular expression)
||
  ||int ||find_in_set(string str, string strList) ||Returns the first occurance of str in
strList where strList is a comma-delimited string. Returns null if either argument is null.
Returns 0 if the first argument contains any commas. e.g. find_in_set('ab', 'abc,b,ab,c,def')
returns 3 ||
  ||array<array<string>> || sentences(string str, string lang, string locale)
|| Tokenizes a string of natural language text into words and sentences, where each sentence
is broken at the appropriate sentence boundary and returned as an array of words. The 'lang'
and 'locale' are optional arguments. e.g. sentences('Hello there! How are you?') returns (
("Hello", "there"), ("How", "are", "you") ) ||
  ||array<struct<string,double>> || ngrams(array<array<string>>, int
N, int K, int pf) || Returns the top-k N-grams from a set of tokenized sentences, such as
those returned by the sentences() UDAF. See [[Hive/StatisticsAndDataMining]] for more information.
||

Mime
View raw message