日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

hive最新UDF函数(2016-10-25)

發(fā)布時(shí)間:2023/12/20 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 hive最新UDF函数(2016-10-25) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

為什么80%的碼農(nóng)都做不了架構(gòu)師?>>> ??

hive UDF函數(shù) :(后期翻譯,暫時(shí)先貼著,有興趣來 ?http://apache.wiki?可以一起來翻譯呀)

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF

不過這個(gè)基本是不需要什么翻譯,直接測(cè)試就行

LanguageManual UDF

?

Hive Operators and User-Defined Functions (UDFs)

?

  • Hive Operators and User-Defined Functions (UDFs)
    • Built-in Operators
      • Operators precedences
      • Relational Operators
      • Arithmetic Operators
      • Logical Operators
      • String Operators
      • Complex Type Constructors
      • Operators on Complex Types
    • Built-in Functions
      • Mathematical Functions
        • Mathematical Functions and Operators for Decimal Datatypes
      • Collection Functions
      • Type Conversion Functions
      • Date Functions
      • Conditional Functions
      • String Functions
      • Data Masking Functions
      • Misc. Functions
        • xpath
        • get_json_object
    • Built-in Aggregate Functions (UDAF)
    • Built-in Table-Generating Functions (UDTF)
      • explode
      • posexplode
      • json_tuple
      • parse_url_tuple
    • GROUPing and SORTing on f(column)
    • UDF internals
    • Creating Custom UDFs

?

Case-insensitive

?

All Hive keywords are case-insensitive, including the names of Hive operators and functions.

In?Beeline?or the?CLI, use the commands below to show the latest documentation:

SHOW FUNCTIONS; DESCRIBE FUNCTION <function_name>; DESCRIBE FUNCTION EXTENDED <function_name>;

Bug for expression caching when UDF nested in UDF or function

?

When?hive.cache.expr.evaluation?is set to true (which is the default) a UDF can give incorrect results if it is nested in another UDF or a Hive function. This bug affects releases 0.12.0, 0.13.0, and 0.13.1. Release 0.14.0 fixed the bug (HIVE-7314).

The problem relates to the UDF's implementation of the getDisplayString method, as?discussed?in the Hive user mailing list.

Built-in Operators

Operators precedences

Example

Operators

Description

A[B] , A.identifierbracket_op([]), dot(.)element selector, dot

-A

unary(+), unary(-), unary(~)

unary prefix operators

A IS (NOT) NULLIS NULL,IS NOT NULLunary suffix

A ^ B

bitwise xor(^)

bitwise xor

A * Bstar(*), divide(/), mod(%), div(DIV)multiplicative operators
A + Bplus(+), minus(-)

additive operators

A || Bstring concatenate(||)string concatenate
A & Bbitwise and(&)bitwise and
A | Bbitwise or(|)bitwise or

Relational Operators

The following operators compare the passed operands and generate a TRUE or FALSE value depending on whether the comparison between the operands holds.

Operator

Operand types

Description

A = B

All primitive types

TRUE if expression A is equal to expression B otherwise FALSE.

A == BAll primitive typesSynonym for the = operator.

A <=> B

All primitive types

Returns same result with EQUAL(=) operator for non-null operands, but returns TRUE if both are NULL, FALSE if one of the them is NULL. (As of version?0.9.0.)

A <> B

All primitive types

NULL if A or B is NULL, TRUE if expression A is NOT equal to expression B, otherwise FALSE.

A != B

All primitive types

Synonym for the <> operator.

A < B

All primitive types

NULL if A or B is NULL, TRUE if expression A is less than expression B, otherwise FALSE.

A <= B

All primitive types

NULL if A or B is NULL, TRUE if expression A is less than or equal to expression B, otherwise FALSE.

A > B

All primitive types

NULL if A or B is NULL, TRUE if expression A is greater than expression B, otherwise FALSE.

A >= B

All primitive types

NULL if A or B is NULL, TRUE if expression A is greater than or equal to expression B, otherwise FALSE.

A [NOT] BETWEEN B AND C

All primitive types

NULL if A, B or C is NULL, TRUE if A is greater than or equal to B AND A less than or equal to C, otherwise FALSE. This can be inverted by using the NOT keyword. (As of version?0.9.0.)

A IS NULL

All types

TRUE if expression A evaluates to NULL, otherwise FALSE.

A IS NOT NULL

All types

FALSE if expression A evaluates to NULL, otherwise TRUE.

A [NOT] LIKE B

strings

NULL if A or B is NULL, TRUE if string A matches the SQL simple regular expression B, otherwise FALSE. The comparison is done character by character. The _ character in B matches any character in A (similar to . in posix regular expressions) while the % character in B matches an arbitrary number of characters in A (similar to .* in posix regular expressions). For example, 'foobar' like 'foo' evaluates to FALSE whereas 'foobar' like 'foo_ _ _' evaluates to TRUE and so does 'foobar' like 'foo%'.

A RLIKE B

strings

NULL if A or B is NULL, TRUE if any (possibly empty) substring of A matches the Java regular expression B, otherwise FALSE. For example, 'foobar' RLIKE 'foo' evaluates to TRUE and so does 'foobar' RLIKE '^f.*r$'.

A REGEXP B

strings

Same as RLIKE.

Arithmetic Operators

The following operators support various common arithmetic operations on the operands. All return number types; if any of the operands are NULL, then the result is also NULL.

Operator

Operand types

Description

A + B

All number types

Gives the result of adding A and B. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands. For example since every integer is a float, therefore float is a containing type of integer so the + operator on a float and an int will result in a float.

A - B

All number types

Gives the result of subtracting B from A. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands.

A * B

All number types

Gives the result of multiplying A and B. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands. Note that if the multiplication causing overflow, you will have to cast one of the operators to a type higher in the type hierarchy.

A / B

All number types

Gives the result of dividing A by B. The result is a double type in most cases. When A and B are both integers, the result is a double type except when the?hive.compat?configuration parameter is set to "0.13" or "latest" in which case the result is a decimal type.

A % B

All number types

Gives the reminder resulting from dividing A by B. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands.

A & B

All number types

Gives the result of bitwise AND of A and B. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands.

A | B

All number types

Gives the result of bitwise OR of A and B. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands.

A ^ B

All number types

Gives the result of bitwise XOR of A and B. The type of the result is the same as the common parent(in the type hierarchy) of the types of the operands.

~A

All number types

Gives the result of bitwise NOT of A. The type of the result is the same as the type of A.

Logical Operators

The following operators provide support for creating logical expressions. All of them return boolean TRUE, FALSE, or NULL depending upon the boolean values of the operands. NULL behaves as an "unknown" flag, so if the result depends on the state of an unknown, the result itself is unknown.

Operator

Operand types

Description

A AND B

boolean

TRUE if both A and B are TRUE, otherwise FALSE. NULL if A or B is NULL.

A OR B

boolean

TRUE if either A or B or both are TRUE, FALSE OR NULL is NULL, otherwise FALSE.

NOT A

boolean

TRUE if A is FALSE or NULL if A is NULL. Otherwise FALSE.

! A

boolean

Same as NOT A.

A IN (val1, val2, ...)

boolean

TRUE if A is equal to any of the values. As of Hive 0.13?subqueries?are supported in IN statements.

A NOT IN (val1, val2, ...)

boolean

TRUE if A is not equal to any of the values. As of Hive 0.13?subqueries?are supported in NOT IN statements.

[NOT] EXISTS (subquery)

?

TRUE if the the subquery returns at least one row. Supported as of?Hive 0.13.

String Operators

?

Operator

Operand types

Description

A || B

strings?

Concatenates the operands - shorthand for?concat(A,B)?. Supported as of?Hive 2.2.0.

Complex Type Constructors

The following functions construct instances of complex types.

Constructor Function

Operands

Description

map

(key1, value1, key2, value2, ...)

Creates a map with the given key/value pairs.

struct

(val1, val2, val3, ...)

Creates a struct with the given field values. Struct field names will be col1, col2, ....

named_struct

(name1, val1, name2, val2, ...)

Creates a struct with the given field names and values. (As of Hive?0.8.0.)

array

(val1, val2, ...)

Creates an array with the given elements.

create_union

(tag, val1, val2, ...)

Creates a union type with the value that is being pointed to by the tag parameter.

Operators on Complex Types

The following operators provide mechanisms to access elements in Complex Types.

Operator

Operand types

Description

A[n]

A is an Array and n is an int

Returns the nth element in the array A. The first element has index 0. For example, if A is an array comprising of ['foo', 'bar'] then A[0] returns 'foo' and A[1] returns 'bar'.

M[key]

M is a Map<K, V> and key has type K

Returns the value corresponding to the key in the map. For example, if M is a map comprising of {'f' -> 'foo', 'b' -> 'bar', 'all' -> 'foobar'} then M['all'] returns 'foobar'.

S.x

S is a struct

Returns the x field of S. For example for the struct foobar {int foo, int bar}, foobar.foo returns the integer stored in the foo field of the struct.

Built-in Functions

Mathematical Functions

The following built-in mathematical functions are supported in Hive; most return NULL when the argument(s) are NULL:

Return Type

Name (Signature)

Description

DOUBLE

round(DOUBLE a)

Returns the rounded?BIGINT?value of?a.

DOUBLE

round(DOUBLE a, INT d)

Returns?a?rounded to?d?decimal places.

DOUBLEbround(DOUBLE a)Returns the rounded BIGINT value of?a?using HALF_EVEN rounding mode (as of?Hive 1.3.0, 2.0.0). Also known as Gaussian rounding or bankers' rounding. Example: bround(2.5) = 2, bround(3.5) = 4.
DOUBLEbround(DOUBLE a, INT d)Returns?a?rounded to?d?decimal places using HALF_EVEN rounding mode (as of?Hive 1.3.0, 2.0.0). Example: bround(8.25, 1) = 8.2, bround(8.35, 1) = 8.4.

BIGINT

floor(DOUBLE a)

Returns the maximum?BIGINT?value that is equal to or less than?a.

BIGINT

ceil(DOUBLE a), ceiling(DOUBLE a)

Returns the minimum BIGINT value that is equal to or greater than?a.

DOUBLE

rand(), rand(INT seed)

Returns a random number (that changes from row to row) that is distributed uniformly from 0 to 1. Specifying the seed will make sure the generated random number sequence is deterministic.

DOUBLE

exp(DOUBLE a), exp(DECIMAL a)

Returns?ea?where?e?is the base of the natural logarithm. Decimal version added in?Hive 0.13.0.

DOUBLE

ln(DOUBLE a), ln(DECIMAL a)

Returns the natural logarithm of the argument?a. Decimal version added in?Hive 0.13.0.

DOUBLE

log10(DOUBLE a), log10(DECIMAL a)

Returns the base-10 logarithm of the argument?a. Decimal version added in?Hive 0.13.0.

DOUBLE

log2(DOUBLE a), log2(DECIMAL a)

Returns the base-2 logarithm of the argument?a. Decimal version added in?Hive 0.13.0.

DOUBLE

log(DOUBLE base, DOUBLE a)

log(DECIMAL base, DECIMAL a)

Returns the base-base?logarithm of the argument?a.?Decimal versions added in?Hive 0.13.0.

DOUBLE

pow(DOUBLE a, DOUBLE p), power(DOUBLE a, DOUBLE p)

Returns?ap.

DOUBLE

sqrt(DOUBLE a), sqrt(DECIMAL a)

Returns the square root of?a. Decimal version added in?Hive 0.13.0.

STRING

bin(BIGINT a)

Returns the number in binary format (see?http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_bin).

STRING

hex(BIGINT a) hex(STRING a) hex(BINARY a)

If the argument is an?INT?or?binary,?hex?returns the number as a?STRING?in hexadecimal format. Otherwise if the number is a?STRING, it converts each character into its hexadecimal representation and returns the resulting?STRING. (See?http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_hex,?BINARY?version as of Hive?0.12.0.)

BINARY

unhex(STRING a)

Inverse of hex. Interprets each pair of characters as a hexadecimal number and converts to the byte representation of the number. (BINARY?version as of Hive?0.12.0, used to return a string.)

STRING

conv(BIGINT num, INT from_base, INT to_base), conv(STRING num, INT from_base, INT to_base)

Converts a number from a given base to another (see?http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_conv).

DOUBLE

abs(DOUBLE a)

Returns the absolute value.

INT or DOUBLE

pmod(INT a, INT b), pmod(DOUBLE a, DOUBLE b)

Returns the positive value of?a mod b.

DOUBLE

sin(DOUBLE a), sin(DECIMAL a)

Returns the sine of?a?(a?is in radians). Decimal version added in?Hive 0.13.0.

DOUBLE

asin(DOUBLE a), asin(DECIMAL a)

Returns the arc sin of?a?if -1<=a<=1 or NULL otherwise. Decimal version added in?Hive 0.13.0.

DOUBLE

cos(DOUBLE a), cos(DECIMAL a)

Returns the cosine of?a?(a?is in radians). Decimal version added in?Hive 0.13.0.

DOUBLE

acos(DOUBLE a), acos(DECIMAL a)

Returns the arccosine of?a?if -1<=a<=1 or NULL otherwise. Decimal version added in?Hive 0.13.0.

DOUBLE

tan(DOUBLE a), tan(DECIMAL a)

Returns the tangent of?a?(a?is in radians). Decimal version added in?Hive 0.13.0.

DOUBLE

atan(DOUBLE a), atan(DECIMAL a)

Returns the arctangent of?a. Decimal version added in?Hive 0.13.0.

DOUBLE

degrees(DOUBLE a), degrees(DECIMAL a)

Converts value of?a?from radians to degrees. Decimal version added in?Hive 0.13.0.

DOUBLE

radians(DOUBLE a), radians(DOUBLE a)

Converts value of?a?from degrees to radians. Decimal version added in?Hive 0.13.0.

INT or DOUBLE

positive(INT a), positive(DOUBLE a)

Returns?a.

INT or DOUBLE

negative(INT a), negative(DOUBLE a)

Returns?-a.

DOUBLE or INT

sign(DOUBLE a), sign(DECIMAL a)

Returns the sign of?a?as '1.0' (if?a?is positive) or '-1.0' (if?a?is negative), '0.0' otherwise. The decimal version returns INT instead of DOUBLE. Decimal version added in?Hive 0.13.0.

DOUBLE

e()

Returns the value of?e.

DOUBLE

pi()

Returns the value of?pi.

BIGINTfactorial(INT a)Returns the factorial of?a?(as of Hive?1.2.0). Valid?a?is [0..20].
DOUBLEcbrt(DOUBLE a)Returns the cube root of?a?double value?(as of Hive?1.2.0).

INT

BIGINT

shiftleft(TINYINT|SMALLINT|INT a, INT b)

shiftleft(BIGINT a, INT?b)

Bitwise left shift (as of Hive?1.2.0). Shifts?a?b?positions to the left.

Returns int for tinyint, smallint and int?a. Returns bigint for bigint?a.

INT

BIGINT

shiftright(TINYINT|SMALLINT|INT a, INT?b)

shiftright(BIGINT a, INT?b)

Bitwise right shift (as of Hive?1.2.0). Shifts?a?b?positions to the right.

Returns int for tinyint, smallint and int?a. Returns bigint for bigint?a.

INT

BIGINT

shiftrightunsigned(TINYINT|SMALLINT|INTa, INT b),

shiftrightunsigned(BIGINT a, INT b)

Bitwise unsigned right shift (as of Hive?1.2.0).?Shifts?a?b?positions to the right.

Returns int for tinyint, smallint and int?a. Returns bigint for bigint?a.

Tgreatest(T v1, T v2, ...)Returns the greatest value of the list of values (as of Hive?1.1.0). Fixed to return NULL when one or more arguments are NULL, and strict type restriction relaxed, consistent with ">" operator (as of Hive?2.0.0).
Tleast(T v1, T v2, ...)Returns the least value of the list of values (as of Hive?1.1.0).?Fixed to return NULL when one or more arguments are NULL, and strict type restriction relaxed, consistent with "<" operator (as of Hive?2.0.0).

Mathematical Functions and Operators for Decimal Datatypes

Version

?

The decimal datatype was introduced in Hive 0.11.0 (HIVE-2693).

All regular arithmetic operators (such as +, -, *, /) and relevant mathematical UDFs (Floor, Ceil, Round, and many more) have been updated to handle decimal types. For a list of supported UDFs, see?Mathematical UDFs?in?Hive Data Types.

Collection Functions

The following built-in collection functions are supported in Hive:

Return Type

Name(Signature)

Description

int

size(Map<K.V>)

Returns the number of elements in the map type.

int

size(Array<T>)

Returns the number of elements in the array type.

array<K>

map_keys(Map<K.V>)

Returns an unordered array containing the keys of the input map.

array<V>

map_values(Map<K.V>)

Returns an unordered array containing the values of the input map.

boolean

array_contains(Array<T>, value)

Returns TRUE if the array contains value.

array<t>

sort_array(Array<T>)

Sorts the input array in ascending order according to the natural ordering of the array elements and returns it (as of version?0.9.0).

Type Conversion Functions

The following type conversion functions are supported in Hive:

Return Type

Name(Signature)

Description

binary

binary(string|binary)

Casts the parameter into a binary.

Expected "=" to follow "type"

cast(expr as <type>)

Converts the results of the expression expr to <type>. For example, cast('1' as BIGINT) will convert the string '1' to its integral representation. A null is returned if the conversion does not succeed. If cast(expr as boolean) Hive returns true for a non-empty string.

Date Functions

The following built-in date functions are supported in Hive:

Return Type

Name(Signature)

Description

string

from_unixtime(bigint unixtime[, string format])

Converts the number of seconds from unix epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment in the current system time zone in the format of "1970-01-01 00:00:00".

bigint

unix_timestamp()

Gets current Unix timestamp in seconds. This function is non-deterministic and prevents proper optimization of queries - this has been deprecated since 2.0 in favour of CURRENT_TIMESTAMP constant.

bigint

unix_timestamp(string date)

Converts time string in format?yyyy-MM-dd HH:mm:ss?to Unix timestamp (in seconds), using the default timezone and the default locale, return 0 if fail: unix_timestamp('2009-03-20 11:30:01') = 1237573801

bigint

unix_timestamp(string date, string pattern)

Convert time string with given pattern (see [http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html]) to Unix time stamp (in seconds), return 0 if fail: unix_timestamp('2009-03-20', 'yyyy-MM-dd') = 1237532400.

pre?2.1.0:?string

2.1.0?on:?date

to_date(string timestamp)

Returns the date part of a timestamp string (pre-Hive 2.1.0): to_date("1970-01-01 00:00:00") = "1970-01-01". As of Hive 2.1.0, returns a date object.

Prior to Hive 2.1.0 (HIVE-13248) the return type was a String because no Date type existed when the method was created.

int

year(string date)

Returns the year part of a date or a timestamp string: year("1970-01-01 00:00:00") = 1970, year("1970-01-01") = 1970.

int

quarter(date/timestamp/string)Returns the quarter of the year for a date, timestamp, or string in the range 1 to 4 (as of Hive?1.3.0). Example: quarter('2015-04-08') = 2.

int

month(string date)

Returns the month part of a date or a timestamp string: month("1970-11-01 00:00:00") = 11, month("1970-11-01") = 11.

int

day(string date) dayofmonth(date)

Returns the day part of a date or a timestamp string: day("1970-11-01 00:00:00") = 1, day("1970-11-01") = 1.

int

hour(string date)

Returns the hour of the timestamp: hour('2009-07-30 12:58:59') = 12, hour('12:58:59') = 12.

int

minute(string date)

Returns the minute of the timestamp.

int

second(string date)

Returns the second of the timestamp.

int

weekofyear(string date)

Returns the week number of a timestamp string: weekofyear("1970-11-01 00:00:00") = 44, weekofyear("1970-11-01") = 44.

int

datediff(string enddate, string startdate)

Returns the number of days from startdate to enddate: datediff('2009-03-01', '2009-02-27') = 2.

pre?2.1.0:?string

2.1.0?on:?date

date_add(string startdate, int days)

Adds a number of days to startdate: date_add('2008-12-31', 1) = '2009-01-01'.

Prior to Hive 2.1.0 (HIVE-13248) the return type was a String because no Date type existed when the method was created.

pre?2.1.0:?string

2.1.0?on:?date

date_sub(string startdate, int days)

Subtracts a number of days to startdate: date_sub('2008-12-31', 1) = '2008-12-30'.

Prior to Hive 2.1.0 (HIVE-13248) the return type was a String because no Date type existed when the method was created.

timestamp

from_utc_timestamp(timestamp, string timezone)

Assumes given timestamp is UTC and converts to given timezone (as of Hive?0.8.0). For example, from_utc_timestamp('1970-01-01 08:00:00','PST') returns 1970-01-01 00:00:00.

timestamp

to_utc_timestamp(timestamp, string timezone)

Assumes given timestamp is in given timezone and converts to UTC (as of Hive?0.8.0). For example, to_utc_timestamp('1970-01-01 00:00:00','PST') returns 1970-01-01 08:00:00.

datecurrent_date

Returns the current date at the start of query evaluation (as of Hive?1.2.0). All calls of current_date within the same query return the same value.

timestampcurrent_timestamp

Returns the current timestamp at the start of query evaluation?(as of Hive?1.2.0). All calls of current_timestamp within the same query return the same value.

stringadd_months(string start_date, int num_months)

Returns the date that is num_months after start_date?(as of Hive?1.1.0). start_date is a string, date or timestamp. num_months is an integer. The time part of start_date is ignored.?If start_date is the last day of the month or if the resulting month has fewer days than the day component of start_date, then the result is the last day of the resulting month. Otherwise, the result has the same day component as start_date.

stringlast_day(string date)Returns the last day of the month which the date belongs to?(as of Hive?1.1.0). date is a string in the format 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd'.?The time part of date is ignored.
stringnext_day(string start_date, string day_of_week)Returns the first date which is later than start_date and named as day_of_week?(as of Hive?1.2.0).?start_date is a string/date/timestamp. day_of_week is 2 letters, 3 letters or full name of the day of the week (e.g. Mo, tue, FRIDAY). The time part of start_date is ignored. Example: next_day('2015-01-14', 'TU') = 2015-01-20.
stringtrunc(string date, string format)Returns date truncated to the unit specified by the format?(as of Hive?1.2.0). Supported formats: MONTH/MON/MM, YEAR/YYYY/YY. Example: trunc('2015-03-17', 'MM') = 2015-03-01.
doublemonths_between(date1, date2)Returns number of months between dates date1 and date2 (as of Hive?1.2.0). If date1 is later than date2, then the result is positive. If date1 is earlier than date2, then the result is negative. If date1 and date2 are either the same days of the month or both last days of months, then the result is always an integer. Otherwise the UDF calculates the fractional portion of the result based on a 31-day month and considers the difference in time components date1 and date2. date1 and date2 type can be date, timestamp or string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'. The result is rounded to 8 decimal places. Example: months_between('1997-02-28 10:30:00', '1996-10-30') = 3.94959677
stringdate_format(date/timestamp/string ts, string fmt)

Converts a date/timestamp/string to a value of string in the format specified by the date format fmt (as of Hive?1.2.0). Supported formats are Java SimpleDateFormat formats?–?https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html. The second argument fmt should be constant. Example: date_format('2015-04-08', 'y') = '2015'.

date_format can be used to implement other UDFs, e.g.:

  • dayname(date) is date_format(date, 'EEEE')
  • dayofyear(date) is date_format(date, 'D')

Conditional Functions

Return Type

Name(Signature)

Description

T

if(boolean testCondition, T valueTrue, T valueFalseOrNull)

Returns valueTrue when testCondition is true, returns valueFalseOrNull otherwise.

booleanisnull( a )Returns true if a is NULL and false otherwise.
booleanisnotnull ( a )Returns true if a is not NULL and false otherwise.
Tnvl(T value, T default_value)Returns default value if value is null else returns value (as of HIve?0.11).

T

COALESCE(T v1, T v2, ...)

Returns the first v that is not NULL, or NULL if all v's are NULL.

T

CASE a WHEN b THEN c [WHEN d THEN e]* [ELSE f] END

When a = b, returns c; when a = d, returns e; else returns f.

T

CASE WHEN a THEN b [WHEN c THEN d]* [ELSE e] END

When a = true, returns b; when c = true, returns d; else returns e.

Tnullif( a, b )

Returns NULL if a=b; otherwise returns a?(as of Hive?2.2.0).

Shorthand for: CASE?WHEN a = b then NULL else a

String Functions

The following built-in String functions are supported in Hive:

Return Type

Name(Signature)

Description

int

ascii(string str)

Returns the numeric value of the first character of str.

string

base64(binary bin)

Converts the argument from binary to a base 64 string (as of Hive?0.12.0).

stringchr(bigint|double A)Returns the ASCII character having the binary equivalent to A (as of Hive?1.3.0 and 2.1.0). If A is larger than 256 the result is equivalent to chr(A % 256). Example: select chr(88); returns "X".

string

concat(string|binary A, string|binary B...)

Returns the string or bytes resulting from concatenating the strings or bytes passed in as parameters in order. For example, concat('foo', 'bar') results in 'foobar'. Note that this function can take any number of input strings.

array<struct<string,double>>

context_ngrams(array<array<string>>, array<string>, int K, int pf)

Returns the top-k contextual N-grams from a set of tokenized sentences, given a string of "context". See?StatisticsAndDataMining?for more information.

string

concat_ws(string SEP, string A, string B...)

Like concat() above, but with custom separator SEP.

string

concat_ws(string SEP, array<string>)

Like concat_ws() above, but taking an array of strings. (as of Hive?0.9.0)

string

decode(binary bin, string charset)

Decodes the first argument into a String using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'). If either argument is null, the result will also be null. (As of Hive?0.12.0.)

binary

encode(string src, string charset)

Encodes the first argument into a BINARY using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'). If either argument is null, the result will also be null. (As of Hive?0.12.0.)

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. For example, find_in_set('ab', 'abc,b,ab,c,def') returns 3.

string

format_number(number x, int d)

Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, the result has no decimal point or fractional part. (As of Hive?0.10.0; bug with float types fixed in?Hive 0.14.0, decimal type support added in?Hive 0.14.0)

string

get_json_object(string json_string, string path)

Extracts json object from a json string based on json path specified, and returns json string of the extracted json object. It will return null if the input json string is invalid.?NOTE: The json path can only have the characters [0-9a-z_], i.e., no upper-case or special characters. Also, the keys *cannot start with numbers.* This is due to restrictions on Hive column names.

boolean

in_file(string str, string filename)

Returns true if the string str appears as an entire line in filename.

int

instr(string str, string substr)

Returns the position of the first occurrence of?substr?in?str. Returns?null?if either of the arguments are?null?and returns?0?if?substrcould not be found in?str. Be aware that this is not zero based. The first character in?str?has index 1.

int

length(string A)

Returns the length of the string.

int

locate(string substr, string str[, int pos])

Returns the position of the first occurrence of substr in str after position pos.

string

lower(string A) lcase(string A)

Returns the string resulting from converting all characters of B to lower case. For example, lower('fOoBaR') results in 'foobar'.

string

lpad(string str, int len, string pad)

Returns str, left-padded with pad to a length of len.

string

ltrim(string A)

Returns the string resulting from trimming spaces from the beginning(left hand side) of A. For example, ltrim(' foobar ') results in 'foobar '.

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?StatisticsAndDataMining?for more information.

string

parse_url(string urlString, string partToExtract [, string keyToExtract])

Returns the specified part from the URL. Valid values for partToExtract include HOST, PATH, QUERY, REF, PROTOCOL, AUTHORITY, FILE, and USERINFO. For example, parse_url('http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1', 'HOST') returns 'facebook.com'. Also a value of a particular key in QUERY can be extracted by providing the key as the third argument, for example, parse_url('http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1', 'QUERY', 'k1') returns 'v1'.

string

printf(String format, Obj... args)

Returns the input formatted according do printf-style format strings (as of Hive?0.9.0).

string

regexp_extract(string subject, string pattern, int index)

Returns the string extracted using the pattern. For example, regexp_extract('foothebar', 'foo(.*?)(bar)', 2) returns 'bar.' Note that some care is necessary in using predefined character classes: using '\s' as the second argument will match the letter s; '\\s' is necessary to match whitespace, etc. The 'index' parameter is the Java regex Matcher group() method index. See docs/api/java/util/regex/Matcher.html for more information on the 'index' or Java regex group() method.

string

regexp_replace(string INITIAL_STRING, string PATTERN, string REPLACEMENT)

Returns the string resulting from replacing all substrings in INITIAL_STRING that match the java regular expression syntax defined in PATTERN with instances of REPLACEMENT. For example, regexp_replace("foobar", "oo|ar", "") returns 'fb.' Note that some care is necessary in using predefined character classes: using '\s' as the second argument will match the letter s; '\\s' is necessary to match whitespace, etc.

string

repeat(string str, int n)

Repeats str n times.

stringreplace(string A, string OLD, string NEW)Returns the string A with all non-overlapping?occurrences of OLD replaced with NEW (as of?Hive 1.3.0 and 2.1.0). Example: select replace("ababab", "abab", "Z"); returns "Zab".

string

reverse(string A)

Returns the reversed string.

string

rpad(string str, int len, string pad)

Returns str, right-padded with pad to a length of len.

string

rtrim(string A)

Returns the string resulting from trimming spaces from the end(right hand side) of A. For example, rtrim(' foobar ') results in ' foobar'.

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. For example, sentences('Hello there! How are you?') returns ( ("Hello", "there"), ("How", "are", "you") ).

string

space(int n)

Returns a string of n spaces.

array

split(string str, string pat)

Splits str around pat (pat is a regular expression).

map<string,string>

str_to_map(text[, delimiter1, delimiter2])

Splits text into key-value pairs using two delimiters. Delimiter1 separates text into K-V pairs, and Delimiter2 splits each K-V pair. Default delimiters are ',' for delimiter1 and '=' for delimiter2.

string

substr(string|binary A, int start) substring(string|binary A, int start)

Returns the substring or slice of the byte array of A starting from start position till the end of string A. For example, substr('foobar', 4) results in 'bar' (see [http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substr]).

string

substr(string|binary A, int start, int len) substring(string|binary A, int start, int len)

Returns the substring or slice of the byte array of A starting from start position with length len. For example, substr('foobar', 4, 1) results in 'b' (see [http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substr]).

stringsubstring_index(string A, string delim, int count)Returns the substring from string A before count occurrences of the delimiter delim (as of?Hive?1.3.0). If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned. Substring_index performs a case-sensitive match when searching for delim. Example: substring_index('www.apache.org', '.', 2) = 'www.apache'.

string

translate(string|char|varchar input, string|char|varchar from, string|char|varchar to)

Translates the input string by replacing the characters present in the?from?string with the corresponding characters in the?to?string. This is similar to the?translate?function in?PostgreSQL. If any of the parameters to this UDF are NULL, the result is NULL as well. (Available as of Hive?0.10.0, for string types)

Char/varchar support added as of?Hive 0.14.0.

string

trim(string A)

Returns the string resulting from trimming spaces from both ends of A. For example, trim(' foobar ') results in 'foobar'

binary

unbase64(string str)

Converts the argument from a base 64 string to BINARY. (As of Hive?0.12.0.)

string

upper(string A) ucase(string A)

Returns the string resulting from converting all characters of A to upper case. For example, upper('fOoBaR') results in 'FOOBAR'.

stringinitcap(string A)Returns string, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by whitespace.?(As of Hive1.1.0.)
intlevenshtein(string A, string B)Returns the Levenshtein distance between two strings?(as of Hive?1.2.0). For example, levenshtein('kitten', 'sitting') results in 3.
stringsoundex(string A)Returns soundex code of the string?(as of Hive?1.2.0). For example, soundex('Miller') results in M460.

Data Masking Functions

The following built-in data masking functions are supported in Hive:

Return Type

Name(Signature)

Description

string

mask(string str[, string upper[, string lower[, string number]]])

Returns a masked version of str (as of Hive?2.1.0). By default, upper case letters are converted to "X", lower case letters are converted to "x" and numbers are converted to "n". For example mask("abcd-EFGH-8765-4321") results in xxxx-XXXX-nnnn-nnnn. You can override the characters used in the mask by supplying additional arguments: the second argument controls the mask character for upper case letters, the third argument for lower case letters and the fourth argument for numbers. For example, mask("abcd-EFGH-8765-4321", "U", "l", "#") results in llll-UUUU-####-####.

stringmask_first_n(string str[, int n])Returns a masked version of str with the first n values masked (as of Hive?2.1.0). Upper case letters are converted to "X", lower case letters are converted to "x" and numbers are converted to "n". For example, mask_first_n("1234-5678-8765-4321", 4) results in nnnn-5678-8765-4321.
stringmask_last_n(string str[, int n])Returns a masked version of str with the last n values masked (as of Hive?2.1.0). Upper case letters are converted to "X", lower case letters are converted to "x" and numbers are converted to "n". For example, mask_last_n("1234-5678-8765-4321", 4) results in 1234-5678-8765-nnnn.
stringmask_show_first_n(string str[, int n])Returns a masked version of str, showing the first n characters unmasked (as of Hive?2.1.0). Upper case letters are converted to "X", lower case letters are converted to "x" and numbers are converted to "n". For example, mask_show_first_n("1234-5678-8765-4321", 4) results in 1234-nnnn-nnnn-nnnn.
stringmask_show_last_n(string str[, int n])Returns a masked version of str, showing the last n characters unmasked?(as of Hive?2.1.0). Upper case letters are converted to "X", lower case letters are converted to "x" and numbers are converted to "n". For example, mask_show_last_n("1234-5678-8765-4321", 4) results in nnnn-nnnn-nnnn-4321.
stringmask_hash(string|char|varchar str)Returns a hashed value based on str (as of Hive?2.1.0). The hash is consistent and can be used to join masked values together across tables. This function returns null for non-string types.

Misc. Functions

Return Type

Name(Signature)

Description

varies

java_method(class, method[, arg1[, arg2..]])

Synonym for?reflect. (As of Hive?0.9.0.)

varies

reflect(class, method[, arg1[, arg2..]])

Calls a Java method by matching the argument signature, using reflection. (As of Hive?0.7.0.) See?Reflect (Generic) UDF?for examples.

int

hash(a1[, a2...])

Returns a hash value of the arguments. (As of Hive 0.4.)

stringcurrent_user()Returns current user name from the configured authenticator manager?(as of Hive?1.2.0). Could be the same as the user provided when connecting, but with some authentication managers (for example HadoopDefaultAuthenticator) it could be different.
stringlogged_in_user()Returns current user name from the session state?(as of Hive?2.2.0). This is the username provided when connecting to Hive.
stringcurrent_database()Returns current database name (as of Hive?0.13.0).
stringmd5(string/binary)Calculates an MD5 128-bit checksum for the string or binary (as of Hive?1.3.0). The value is returned as a string of 32 hex digits, or NULL if the argument was NULL. Example: md5('ABC') = '902fbdd2b1df0c4f70b4a5d23525e932'.
string

sha1(string/binary)

sha(string/binary)

Calculates the SHA-1 digest for string or binary and returns the value as a hex string (as of Hive?1.3.0). Example: sha1('ABC') = '3c01bdbb26f358bab27f267924aa2c9a03fcfdb8'.
bigintcrc32(string/binary)Computes a cyclic redundancy check value for string or binary argument and returns bigint value (as of Hive?1.3.0). Example: crc32('ABC') = 2743272264.
stringsha2(string/binary, int)Calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512) (as of Hive?1.3.0). The first argument is the string or binary to be hashed. The second argument indicates the desired bit length of the result, which must have a value of 224, 256, 384, 512, or 0 (which is equivalent to 256). SHA-224 is supported starting from Java 8. If either argument is NULL or the hash length is not one of the permitted values, the return value is NULL. Example: sha2('ABC', 256) = 'b5d4045c3f466fa91fe2cc6abe79232a1a57cdf104f7a26e716e0a1e2789df78'.
binaryaes_encrypt(input string/binary, key string/binary)Encrypt input using AES (as of Hive?1.3.0). Key lengths of 128, 192 or 256 bits can be used. 192 and 256 bits keys can be used if Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files are installed. If either argument is NULL or the key length is not one of the permitted values, the return value is NULL. Example: base64(aes_encrypt('ABC', '1234567890123456')) = 'y6Ss+zCYObpCbgfWfyNWTw=='.
binaryaes_decrypt(input binary, key string/binary)Decrypt input using AES (as of Hive?1.3.0). Key lengths of 128, 192 or 256 bits can be used. 192 and 256 bits keys can be used if Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files are installed. If either argument is NULL or the key length is not one of the permitted values, the return value is NULL. Example: aes_decrypt(unbase64('y6Ss+zCYObpCbgfWfyNWTw=='), '1234567890123456') = 'ABC'.
stringversion()Returns the Hive version (as of Hive?2.1.0). The string contains 2 fields, the first being a build number and the second being a build hash. Example: "select version();" might return "2.1.0.2.5.0.0-1245 r027527b9c5ce1a3d7d0b6d2e6de2378fb0c39232". Actual results will depend on your build.

xpath

The following functions are described in?LanguageManual XPathUDF:

  • xpath, xpath_short, xpath_int, xpath_long, xpath_float, xpath_double, xpath_number, xpath_string

get_json_object

A limited version of JSONPath is supported:

  • $ : Root object
  • . : Child operator
  • [] : Subscript operator for array
  • * : Wildcard for []

Syntax not supported that's worth noticing:

  • : Zero length string as key
  • .. : Recursive descent
  • @ : Current object/element
  • () : Script expression
  • ?() : Filter (script) expression.
  • [,] : Union operator
  • [start:end.step] : array slice operator

Example: src_json table is a single column (json), single row table:

?

+----+

???????????????????????????????json

+----+

{"store":

??{"fruit":\[{"weight":8,"type":"apple"},{"weight":9,"type":"pear"}],

???"bicycle":{"price":19.95,"color":"red"}

??},

?"email":"amy@only_for_json_udf_test.net",

?"owner":"amy"

}

+----+

?

The fields of the json object can be extracted using these queries:

?

hive> SELECT get_json_object(src_json.json,?'$.owner') FROM src_json;

amy

?

hive> SELECT get_json_object(src_json.json,?'$.store.fruit\[0]') FROM src_json;

{"weight":8,"type":"apple"}

?

hive> SELECT get_json_object(src_json.json,?'$.non_exist_key') FROM src_json;

NULL

?

Built-in Aggregate Functions (UDAF)

The following built-in aggregate functions are supported in Hive:

Return Type

Name(Signature)

Description

BIGINT

count(*), count(expr), count(DISTINCT expr[, expr...])

count(*) - Returns the total number of retrieved rows, including rows containing NULL values.

count(expr) - Returns the number of rows for which the supplied expression is non-NULL.

count(DISTINCT expr[, expr]) - Returns the number of rows for which the supplied expression(s) are unique and non-NULL. Execution of this can be optimized with?hive.optimize.distinct.rewrite.

DOUBLE

sum(col), sum(DISTINCT col)

Returns the sum of the elements in the group or the sum of the distinct values of the column in the group.

DOUBLE

avg(col), avg(DISTINCT col)

Returns the average of the elements in the group or the average of the distinct values of the column in the group.

DOUBLE

min(col)

Returns the minimum of the column in the group.

DOUBLE

max(col)

Returns the maximum value of the column in the group.

DOUBLE

variance(col), var_pop(col)

Returns the variance of a numeric column in the group.

DOUBLE

var_samp(col)

Returns the unbiased sample variance of a numeric column in the group.

DOUBLE

stddev_pop(col)

Returns the standard deviation of a numeric column in the group.

DOUBLE

stddev_samp(col)

Returns the unbiased sample standard deviation of a numeric column in the group.

DOUBLE

covar_pop(col1, col2)

Returns the population covariance of a pair of numeric columns in the group.

DOUBLE

covar_samp(col1, col2)

Returns the sample covariance of a pair of a numeric columns in the group.

DOUBLE

corr(col1, col2)

Returns the Pearson coefficient of correlation of a pair of a numeric columns in the group.

DOUBLE

percentile(BIGINT col, p)

Returns the exact pth?percentile of a column in the group (does not work with floating point types). p must be between 0 and 1. NOTE: A true percentile can only be computed for integer values. Use PERCENTILE_APPROX if your input is non-integral.

array<double>

percentile(BIGINT col, array(p1?[, p2]...))

Returns the exact percentiles p1, p2, ... of a column in the group (does not work with floating point types). pi?must be between 0 and 1. NOTE: A true percentile can only be computed for integer values. Use PERCENTILE_APPROX if your input is non-integral.

DOUBLE

percentile_approx(DOUBLE col, p [, B])

Returns an approximate pth?percentile of a numeric column (including floating point types) in the group. The B parameter controls approximation accuracy at the cost of memory. Higher values yield better approximations, and the default is 10,000. When the number of distinct values in col is smaller than B, this gives an exact percentile value.

array<double>

percentile_approx(DOUBLE col, array(p1?[, p2]...) [, B])

Same as above, but accepts and returns an array of percentile values instead of a single one.

array<struct {'x','y'}>

histogram_numeric(col, b)

Computes a histogram of a numeric column in the group using b non-uniformly spaced bins. The output is an array of size b of double-valued (x,y) coordinates that represent the bin centers and heights

array

collect_set(col)

Returns a set of objects with duplicate elements eliminated.

array

collect_list(col)

Returns a list of objects with duplicates. (As of Hive?0.13.0.)

INTEGERntile(INTEGER x)

Divides an ordered partition into?x?groups called buckets and assigns a bucket number to each row in the partition. This?allows easy calculation of tertiles, quartiles, deciles, percentiles and other?common summary statistics. (As of Hive?0.11.0.)

Built-in Table-Generating Functions (UDTF)

Normal user-defined functions, such as concat(), take in a single input row and output a single output row. In contrast, table-generating functions transform a single input row to multiple output rows.

Return Type

Name(Signature)

Description

N rows

explode(ARRAY)

Returns one row for each element from the array.

N rows

explode(MAP)

Returns one row for each key-value pair from the input map with two columns in each row: one for the key and another for the value. (As of Hive?0.8.0.)

?

inline(ARRAY<STRUCT[,STRUCT]>)

Explodes an array of structs into a table. (As of Hive?0.10.)

Array Type

explode(array<TYPE> a)

For each element in a, generates a row containing that element.

tuple

json_tuple(jsonStr, k1, k2, ...)

Takes a set of names (keys) and a JSON string, and returns a tuple of values. This is a more efficient version of the?get_json_object?UDF because it can get multiple keys with just one call.

tuple

parse_url_tuple(url, p1, p2, ...)

This is similar to the?parse_url()?UDF but can extract multiple parts at once out of a URL. Valid part names are: HOST, PATH, QUERY, REF, PROTOCOL, AUTHORITY, FILE, USERINFO, QUERY:<KEY>.

N rows

posexplode(ARRAY)

Behaves like?explode?for arrays, but includes the position of items in the original array by returning a tuple of?(pos, value). (As of?Hive 0.13.0.)

N rows

stack(INT n, v_1, v_2, ..., v_k)

Breaks up v_1, ..., v_k into n rows. Each row will have k/n columns. n must be constant.

Using the syntax "SELECT udtf(col) AS colAlias..." has a few limitations:

  • No other expressions are allowed in SELECT
    • SELECT pageid, explode(adid_list) AS myCol... is not supported
  • UDTF's can't be nested
    • SELECT explode(explode(adid_list)) AS myCol... is not supported
  • GROUP BY / CLUSTER BY / DISTRIBUTE BY / SORT BY is not supported
    • SELECT explode(adid_list) AS myCol ... GROUP BY myCol is not supported

Please see?LanguageManual LateralView?for an alternative syntax that does not have these limitations.

Also see?Writing UDTFs?if you want to create a custom UDTF.

explode

explode()?takes in an array (or a map) as an input and outputs the elements of the array (map) as separate rows. UDTFs can be used in the SELECT expression list and as a part of LATERAL VIEW.

As an example of using?explode()?in the SELECT expression list, consider a table named myTable that has a single column (myCol) and two rows:

Array<int> myCol

[100,200,300]

[400,500,600]

Then running the query:

?

SELECT?explode(myCol)?AS?myNewCol?FROM?myTable;

?

will produce:

(int) myNewCol

100

200

300

400

500

600

The usage with Maps is similar:

?

SELECT?explode(myMap)?AS?(myMapKey, myMapValue)?FROM?myMapTable;

?

posexplode

Version

?

Available as of Hive 0.13.0. See?HIVE-4943.

posexplode()?is similar to?explode?but instead of just returning the elements of the array it returns the element as well as its position in the original array.

As an example of using?posexplode()?in the SELECT expression list, consider a table named myTable that has a single column (myCol) and two rows:

Array<int> myCol

[100,200,300]

[400,500,600]

Then running the query:

?

SELECT?posexplode(myCol)?AS?pos, myNewCol?FROM?myTable;

?

will produce:

(int) pos

(int) myNewCol

1

100

2

200

3

300

1

400

2

500

3

600

json_tuple

A new json_tuple() UDTF is introduced in Hive 0.7. It takes a set of names (keys) and a JSON string, and returns a tuple of values using one function. This is much more efficient than calling GET_JSON_OBJECT to retrieve more than one key from a single JSON string. In any case where a single JSON string would be parsed more than once, your query will be more efficient if you parse it once, which is what JSON_TUPLE is for. As JSON_TUPLE is a UDTF, you will need to use the?LATERAL VIEW?syntax in order to achieve the same goal.

For example,

?

select a.timestamp, get_json_object(a.appevents,?'$.eventid'), get_json_object(a.appenvets,?'$.eventname') from log a;

?

should be changed to:

?

select a.timestamp, b.*

from log a lateral view json_tuple(a.appevent,?'eventid',?'eventname') b as f1, f2;

?

parse_url_tuple

The parse_url_tuple() UDTF is similar to parse_url(), but can extract multiple parts of a given URL, returning the data in a tuple. Values for a particular key in QUERY can be extracted by appending a colon and the key to the partToExtract argument, for example,?parse_url_tuple('http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1', 'QUERY:k1', 'QUERY:k2') returns a tuple with values of 'v1','v2'. This is more efficient than calling parse_url() multiple times. All the input parameters and output column types are string.

?

SELECT b.*

FROM src LATERAL VIEW parse_url_tuple(fullurl,?'HOST',?'PATH',?'QUERY',?'QUERY:id') b as host, path, query, query_id LIMIT?1;

?

GROUPing and SORTing on f(column)

A typical OLAP pattern is that you have a timestamp column and you want to group by daily or other less granular date windows than by second. So you might want to select concat(year(dt),month(dt)) and then group on that concat(). But if you attempt to GROUP BY or SORT BY a column on which you've applied a function and alias, like this:

?

select f(col) as fc, count(*) from table_name group by fc;

?

you will get an error:

?

FAILED: Error in semantic analysis: line?1:69?Invalid Table Alias or Column Reference fc

?

because you are not able to GROUP BY or SORT BY a column alias on which a function has been applied. There are two workarounds. First, you can reformulate this query with subqueries, which is somewhat complicated:

?

select sq.fc,col1,col2,...,colN,count(*) from

??(select f(col) as fc,col1,col2,...,colN from table_name) sq

?group by sq.fc,col1,col2,...,colN;

?

Or you can make sure not to use a column alias, which is simpler:

?

select f(col) as fc, count(*) from table_name group by f(col);

?

Contact Tim Ellis (tellis) at RiotGames dot com if you would like to discuss this in further detail.

UDF internals

The context of a UDF's evaluate method is one row at a time. A simple invocation of a UDF like

?

SELECT length(string_col) FROM table_name;

?

would evaluate the length of each of the string_col's values in the map portion of the job. The side effect of the UDF being evaluated on the map-side is that you can't control the order of rows which get sent to the mapper. It is the same order in which the file split sent to the mapper gets deserialized. Any reduce side operation (such as?SORT BY, ORDER BY, regular JOIN, etc.) would apply to the UDFs output as if it is just another column of the table. This is fine since the context of the UDF's evaluate method is meant to be one row at a time.

If you would like to control which rows get sent to the same UDF (and possibly in what order), you will have the urge to make the UDF evaluate during the reduce phase. This is achievable by making use of?DISTRIBUTE BY, DISTRIBUTE BY + SORT BY, CLUSTER BY. An example query would be:

?

SELECT reducer_udf(my_col, distribute_col, sort_col) FROM

(SELECT my_col, distribute_col, sort_col FROM table_name DISTRIBUTE BY distribute_col SORT BY distribute_col, sort_col) t

?

However, one could argue that the very premise of your requirement to control the set of rows sent to the same UDF is to do aggregation in that UDF. In such a case, using a User Defined Aggregate Function (UDAF) is a better choice. You can read more about writing a UDAF?here. Alternatively, you can user a custom reduce script to accomplish the same using?Hive's Transform functionality. Both of these options would do aggregations on the reduce side.

Creating Custom UDFs

For information about how to create a custom UDF, see?Hive Plugins?and?Create Function.

轉(zhuǎn)載于:https://my.oschina.net/repine/blog/775394

總結(jié)

以上是生活随笔為你收集整理的hive最新UDF函数(2016-10-25)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

亚洲精品国产第一综合99久久 | 五月婷婷欧美视频 | 国产精品久久久久久久av电影 | 国产视频在线免费观看 | 午夜视频二区 | 国产精品自产拍在线观看中文 | 午夜av激情 | 日韩特级片 | 亚洲精品黄色在线观看 | 日产av在线播放 | 亚洲精品国内 | 一级全黄毛片 | 九九九在线观看视频 | 人人看97| 亚洲成人黄色在线 | 色婷婷欧美 | 东方av在线免费观看 | 日日夜夜人人精品 | 深爱五月激情网 | 久久久999精品视频 国产美女免费观看 | 国产精品不卡在线观看 | 欧美日韩免费一区二区 | 成人性生交视频 | 97国产大学生情侣白嫩酒店 | av电影一区二区三区 | 亚洲免费视频观看 | 国产高清在线免费观看 | 日本中文字幕一二区观 | 久久综合色婷婷 | 亚洲天堂精品视频 | 日韩免费视频在线观看 | 热久久免费视频 | 国产男男gay做爰 | 亚洲精品国产高清 | 国产精品人人做人人爽人人添 | www.av免费 | 欧美精品亚州精品 | 麻豆系列在线观看 | 精品国产乱码 | 美女一区网站 | 成人动图 | 日韩精品一区二区在线观看视频 | 国产三级视频 | 日本成人黄色片 | 日日碰狠狠躁久久躁综合网 | 狠狠色狠狠色终合网 | 丁香婷婷网| 色网免费观看 | 2023亚洲精品国偷拍自产在线 | 深爱激情五月网 | 欧美日韩破处 | 久久久一本精品99久久精品 | 人人看人人做人人澡 | 人人爽人人香蕉 | 久久草网站 | 美女在线观看av | 国产99精品在线观看 | 在线视频区 | 午夜国产一区二区 | 日韩精品在线一区 | 成人久久精品视频 | av电影久久| 一区二区视频网站 | 久久久久久久久久影视 | 亚洲美女视频在线观看 | 丁香久久激情 | 成人影片免费 | www.综合网.com | 国产高清一级 | 夜色成人网 | 亚洲精品88欧美一区二区 | 欧美天堂视频在线 | 国产精品一二 | 91在线区 | 国产裸体视频网站 | 99在线观看 | 91免费的视频在线播放 | 国产精品一区在线 | 亚洲国产成人精品电影在线观看 | 夜夜躁狠狠燥 | 久草热视频 | 综合色中色 | 伊人五月 | 亚洲精品免费在线 | 久久国产系列 | 中文字幕精品一区 | 国产精品s色 | 2019中文字幕网站 | 黄色一级在线视频 | 麻豆传媒在线视频 | 国产中的精品av小宝探花 | 欧美日韩高清一区二区三区 | av中文字幕网站 | 久久黄色片 | 四虎永久视频 | 成人免费大片黄在线播放 | 一区二区三区四区免费视频 | 国产黄色免费观看 | 日本在线视频一区二区三区 | 精品黄色在线 | 一区 二区 精品 | 成人av免费看 | 在线高清一区 | 亚洲欧洲av| 久久精选视频 | 国产精品video爽爽爽爽 | 九九久久成人 | 亚州精品成人 | 一性一交视频 | 国产精品久久久久久久久毛片 | 日韩网站免费观看 | 天天爱天天色 | 99这里只有久久精品视频 | 婷婷色视频 | 国产精品美女久久久久久免费 | 99av在线视频 | 中文字幕欧美三区 | 亚洲国产午夜视频 | 成人综合日日夜夜 | 激情欧美一区二区三区免费看 | 五月婷婷综合在线观看 | 亚洲国产操 | 成人黄色小说网 | 青草视频在线播放 | 国产精品久久久久久久免费大片 | 欧美在线观看视频 | 久久99热这里只有精品 | 日本亚洲国产 | 女人18毛片a级毛片一区二区 | 麻豆传媒视频在线播放 | 一区 二区电影免费在线观看 | 狠狠狠色丁香婷婷综合久久88 | 香蕉网址 | 中文字幕在线免费看线人 | 97久久精品午夜一区二区 | 亚洲黄色网络 | 中文字幕文字幕一区二区 | 久久免费公开视频 | 色99中文字幕 | 五月激情综合婷婷 | 日韩精品免费一区二区在线观看 | 国产1区在线观看 | 麻豆视频免费播放 | 少妇bbbb揉bbbb日本 | 丁香花中文在线免费观看 | 国产自产在线视频 | 欧美韩国日本在线观看 | 亚洲精品裸体 | 激情五月综合网 | 97精产国品一二三产区在线 | 狠狠色婷婷丁香六月 | 日韩在线观看精品 | 成年人在线观看视频免费 | 国产精品尤物视频 | 日本九九视频 | 在线黄色毛片 | 成人在线网站观看 | 国产成人av一区二区三区在线观看 | 国产香蕉久久精品综合网 | 超碰97国产| 国产精品一区二区三区观看 | 午夜精品久久久久久久爽 | 2019精品手机国产品在线 | 性日韩欧美在线视频 | 人人草在线观看 | 国产黄色片免费观看 | 97成人精品| a在线一区 | 黄色软件大全网站 | 国产一区精品在线 | 欧美精品日韩 | 国产在线第三页 | 黄色av三级在线 | 西西4444www大胆无视频 | 91福利视频久久久久 | 国产夫妻性生活自拍 | 香蕉在线视频播放网站 | 久久99网| 久久伊人五月天 | 日韩免费高清在线 | 亚洲区二区 | 成人动漫一区二区 | 91视频在线国产 | 久久午夜国产 | 中文字幕九九 | 精品免费观看视频 | 亚洲综合射 | 久久精品一二三区 | 国产成人av网站 | 天天射天天射 | 免费一级特黄毛大片 | 亚洲黄色成人 | 免费在线一区二区 | 久久久久久久久福利 | 日韩不卡高清视频 | 日韩欧美有码在线 | 日本久久中文字幕 | 欧美日韩精品免费观看视频 | 亚洲成人第一区 | 成人在线黄色 | 成人黄色小说在线观看 | 国产精品黄网站在线观看 | 97碰碰精品嫩模在线播放 | 亚洲精品h | 日韩欧美精品在线视频 | 成人免费 在线播放 | 五月天电影免费在线观看一区 | 亚洲精品在线视频播放 | 又黄又刺激视频 | 福利视频入口 | 国产视频日韩视频欧美视频 | 蜜臀av麻豆 | 国产精品美女免费视频 | 国产色a在线观看 | 精品国产一二三四区 | 超碰人人在线观看 | 日本精品一二区 | 九九99 | 成年一级片 | 日本三级在线观看中文字 | 欧美日韩综合在线观看 | 在线观看视频一区二区三区 | 黄色网免费 | 91理论片午午伦夜理片久久 | 国产在线看 | 日韩免费av在线 | 激情视频一区二区三区 | www亚洲国产 | 天堂av高清 | 欧美激情综合五月 | 美女视频黄网站 | 欧美日韩高清 | 日韩高清免费在线 | 激情av一区二区 | 婷婷社区五月天 | 西西www4444大胆视频 | 99中文在线 | 日韩成人精品一区二区三区 | 黄色影院在线免费观看 | 国产精品一区二区三区在线播放 | 97精品国产97久久久久久粉红 | 97干com| 91精品国产综合久久福利 | 成人羞羞视频在线观看免费 | 欧美另类成人 | 亚洲国产视频a | www最近高清中文国语在线观看 | 欧美污网站 | 黄色视屏av | 欧美日韩不卡在线 | 日韩欧美在线观看一区二区 | 久久久高清视频 | 欧美性色网站 | 午夜骚影| 亚洲欧洲精品一区二区精品久久久 | 中文字幕在线观看完整版电影 | 欧美大片大全 | 亚洲精品综合一二三区在线观看 | 九色精品| 天堂网中文在线 | 狠狠狠狠狠狠天天爱 | 中文字幕在线视频一区二区三区 | 欧美电影在线观看 | 网站免费黄色 | 亚洲天天在线日亚洲洲精 | 麻豆国产视频 | 亚洲日本欧美在线 | 国产91在线 | 美洲 | 91人人在线 | 国产黄在线看 | 在线99热| 欧美性粗大hdvideo | 久久久久久久久久久久亚洲 | 亚洲成人一二三 | 色www免费视频 | 少妇av片| 91精品免费| 国产视频美女 | 久日视频| 97精品欧美91久久久久久 | 精品国产亚洲日本 | 国产青草视频在线观看 | 人人擦 | 粉嫩av一区二区三区四区 | 成人久久18免费网站麻豆 | 欧美性色综合网 | 中文在线a√在线 | 精品在线看 | www.色五月.com| 丁香激情综合久久伊人久久 | 91免费网址 | 午夜精品一区二区国产 | 看黄色91| 中文字幕在线观看免费高清完整版 | 91精品国产欧美一区二区成人 | 在线观看韩日电影免费 | 成人黄色大片在线免费观看 | 日日操狠狠干 | 日本中文字幕在线免费观看 | 91高清不卡 | 国产精品永久免费观看 | 黄色大片日本 | 午夜久久福利视频 | 成人久久久精品国产乱码一区二区 | 国产一区二区综合 | 国产精品视频免费 | 久久精品3| 在线看欧美 | 久久久久久久国产精品 | 人人爽久久涩噜噜噜网站 | 国产最新网站 | 黄色a在线 | 在线播放视频一区 | 91夜夜夜 | 99久久久国产精品免费观看 | 免费黄色网址网站 | 色a在线观看 | 91福利视频免费 | 国产色网| 99精品在线看 | 精品亚洲视频在线观看 | 天天色天天上天天操 | 亚洲理论在线 | 婷婷av色综合 | 色综合久久久久综合 | 久久久久久久久久久黄色 | 中文字幕国语官网在线视频 | 91人人干 | 日韩中文字幕亚洲一区二区va在线 | 久久视频在线观看 | 国产精品69av | 99av国产精品欲麻豆 | 四虎在线观看视频 | 日韩视频一区二区三区 | 国产亚洲精品久久久久久 | 在线免费观看黄 | 国产精品久久久久久久久久久久久久 | a爱爱视频 | 成人91视频| 欧美日韩不卡一区二区三区 | 五月天狠狠操 | 日韩高清在线一区二区三区 | 久久夜靖品 | 亚洲精选在线 | 精品久久久久久亚洲 | 欧美在一区 | 草久中文字幕 | 亚洲va天堂va欧美ⅴa在线 | 人人舔人人 | 伊人av综合| 欧美激情精品久久久久久 | 欧美精品v国产精品v日韩精品 | 中文字幕在线观看播放 | 日韩中文字幕视频在线 | 国产精品第2页 | 午夜男人影院 | 天天爱天天操 | 国产无遮挡又黄又爽馒头漫画 | 中文欧美字幕免费 | 玖草影院 | 九九免费观看视频 | 在线久草视频 | av性在线| 久久久免费精品国产一区二区 | 麻豆 videos | 狠狠色噜噜狠狠 | 国产99久久久精品 | 免费99精品国产自在在线 | 四月婷婷在线观看 | 久久精品一级片 | 深夜精品福利 | 国产欧美精品在线观看 | 91麻豆国产| 久久久资源 | 国产欧美在线一区二区三区 | 午夜美女网站 | 一级黄色片在线 | 成人一级视频在线观看 | 国产亚洲精品久久网站 | 丁香色婷婷 | 毛片888| 成人免费网视频 | 国产高清视频在线观看 | 日韩乱码在线 | 免费看成年人 | 日本精品一区二区在线观看 | h网站免费在线观看 | 国产一区二区高清视频 | 日韩视频一区二区三区 | 国产在线免费观看 | 国产又粗又猛又色又黄网站 | av免费成人| 97理论电影 | 国产福利在线不卡 | 偷拍精偷拍精品欧洲亚洲网站 | 97电院网手机版 | 日韩欧美精品在线 | 97超视频在线观看 | 天天综合天天综合 | av一区二区三区在线播放 | 极品中文字幕 | 国产最新在线视频 | 日本91在线| 日韩av高清在线观看 | 欧美日韩视频在线观看一区二区 | 国产精品剧情在线亚洲 | 看毛片的网址 | 亚洲劲爆av| 天天干,天天干 | 国产一区二区在线看 | 国产经典三级 | 玖玖视频精品 | 久久久久亚洲精品成人网小说 | 久久久网站| 国产精品日韩在线 | 日本中文字幕在线一区 | 国产精品福利无圣光在线一区 | 国产午夜精品av一区二区 | 成人免费在线视频观看 | 成人超碰在线 | 碰超在线观看 | 超碰人人草人人 | 国产又粗又猛又色又黄网站 | 欧美日韩性生活 | 欧美视频不卡 | 久久免费在线视频 | 亚洲国产精品一区二区久久hs | 中文日韩在线视频 | 久久精品电影网 | 国产一级片观看 | 中文字幕 在线看 | 一区二区三区在线视频观看58 | 亚洲五月| 日韩视频中文字幕在线观看 | 国产成人精品一区二区 | 精品久久一区二区 | 97超碰国产精品女人人人爽 | 日韩欧美在线高清 | 精品国产乱码久久久久久1区二区 | av最新资源 | 国产美女网站在线观看 | 国产精品不卡在线观看 | 国产精品久久久久久久久久久不卡 | 在线视频日韩精品 | 欧美日韩在线第一页 | 一区二区三区韩国免费中文网站 | 精品久久久久久久久亚洲 | 国产日产av | 在线精品亚洲一区二区 | 国产精品久久久久久久久久东京 | 精品国产色 | 夜夜视频资源 | 成人久久18免费 | 一区二区三区高清在线 | 色婷婷av一区 | 综合精品久久 | 国产精品精品国产 | 国产在线91在线电影 | 国产系列在线观看 | 夜夜夜草 | 亚洲综合精品在线 | 91精品国产91久久久久福利 | 国产在线一区二区三区播放 | 日p在线观看 | 色诱亚洲精品久久久久久 | 日韩免费在线观看视频 | 视频在线观看入口黄最新永久免费国产 | 日韩偷拍精品 | 88av视频| 91九色国产蝌蚪 | 亚洲天堂色婷婷 | 日韩精品在线免费播放 | 日韩中文在线视频 | 97人人模人人爽人人喊网 | 日韩午夜av | 国产日韩在线观看一区 | 奇米网网址 | 91在线免费观看国产 | 国产一级精品绿帽视频 | 久爱综合| 97电影网站 | 国产手机在线观看视频 | 狠狠干美女 | 国产精品久久伊人 | 免费网站污 | 99在线免费观看视频 | 欧洲精品亚洲精品 | 国产99自拍 | 天天玩天天干天天操 | 一区二区三区高清在线观看 | 91在线视频 | 婷婷av色综合 | 国产精品美女久久久久久2018 | 国产精品99页| 成人av网站在线观看 | 精品一区二区久久久久久久网站 | 色av婷婷 | 亚洲国产影院av久久久久 | 国产一性一爱一乱一交 | 天天操天天干天天干 | 久久香蕉影视 | 黄色片视频免费 | 美女网站视频免费都是黄 | 首页av在线 | 欧美极度另类性三渗透 | 日本爱爱片 | 香蕉色综合 | 制服丝袜一区二区 | 久久99热久久99精品 | avav片| 99精品久久99久久久久 | av线上看| 亚洲国产精品久久 | 麻豆91在线播放 | 最新av网址大全 | 人人干人人超 | 特级大胆西西4444www | 91精品国产高清 | 又爽又黄在线观看 | 成人国产精品一区二区 | 成人av影院在线观看 | adn—256中文在线观看 | 91日本在线播放 | 五月婷婷免费 | 蜜桃视频在线观看一区 | 天天拍天天爽 | 亚洲精品www久久久久久 | 超碰免费观看 | 免费一级片在线 | 国产手机精品视频 | 9992tv成人免费看片 | 日韩国产精品久久久久久亚洲 | 在线免费观看一区二区三区 | 97色噜噜| 日韩在线视频免费播放 | 91网页版免费观看 | 精品视频成人 | 91成人精品观看 | 91入口在线观看 | 日韩av高清在线观看 | 国产欧美久久久精品影院 | 成人国产电影在线观看 | 国产尤物在线 | 国产精品久久久电影 | 成人国产一区二区 | 国产永久免费高清在线观看视频 | 在线日本看片免费人成视久网 | 成人v| av中文电影| 麻豆小视频在线观看 | 中文字幕在线播放第一页 | 亚洲激情校园春色 | 中文不卡视频在线 | 天堂va欧美va亚洲va老司机 | 色狠狠久久av五月综合 | 国产三级精品三级在线观看 | 天天操天天干天天干 | 色橹橹欧美在线观看视频高清 | www.91国产 | 国产精品毛片一区视频播不卡 | 久久精品资源 | 国产香蕉视频在线播放 | 久久97久久97精品免视看 | 毛片在线网 | 国产电影黄色av | 亚洲不卡123 | 久久久久久蜜桃一区二区 | 国产 日韩 中文字幕 | 久久视讯| 中文字幕观看在线 | 制服丝袜在线91 | 国产精品日韩在线播放 | 亚洲男模gay裸体gay | 精品一区二区在线免费观看 | 不卡av免费在线观看 | 午夜国产影院 | 91精品一区国产高清在线gif | 激情综合网五月 | 日韩 在线观看 | 欧美一级艳片视频免费观看 | 97在线资源 | 日产乱码一二三区别在线 | 五月开心六月伊人色婷婷 | 色吊丝av中文字幕 | 国产在线播放一区 | 色婷婷久久久 | 在线a人片免费观看视频 | 黄色成年网站 | 日韩丝袜视频 | 久久伊人爱 | 四虎影视av | 欧美日韩国产免费视频 | 玖玖在线免费视频 | 蜜桃av人人夜夜澡人人爽 | 热久久免费视频精品 | 欧美日韩国产一区二区在线观看 | 日韩精品一区二区三区电影 | 色综合天天色综合 | 久久国产亚洲精品 | 91精品一| 日本精品一区二区三区在线播放视频 | 国产精品黄色在线观看 | 日韩欧美v | 成年人在线免费视频观看 | 久久久久久久久久久久久影院 | 久久综合婷婷国产二区高清 | 久久婷婷一区二区三区 | 精品久久久久久亚洲综合网站 | 看片的网址 | 波多野结衣视频一区二区三区 | 国产精品久一 | 日韩在线视频二区 | 婷婷丁香视频 | 亚洲国产精品999 | 成年人在线视频观看 | 成人影片免费 | 久久精品首页 | 日韩高清在线一区二区三区 | 蜜臀av免费一区二区三区 | 亚洲a成人v | 亚洲另类在线视频 | 亚洲综合色视频在线观看 | 欧美日韩国产综合网 | 高潮毛片无遮挡高清免费 | 九草视频在线观看 | 精品国产三级 | 狠狠做深爱婷婷综合一区 | 国产精品久久久久久久久久久久久久 | 欧美精品久久久久a | 国产精品正在播放 | 91天天操| www.久久91| 人人揉人人揉人人揉人人揉97 | 国产精品毛片久久久久久久久久99999999 | 亚洲午夜久久久久久久久 | 久久精品一区 | 激情偷乱人伦小说视频在线观看 | 黄色成人影院 | 国产精品久久久久久久婷婷 | 日韩av在线免费播放 | 国产亚洲精品久久久久久久久久 | 色是在线视频 | 在线观看aa | 精品国产99国产精品 | 精品亚洲午夜久久久久91 | 69国产精品视频免费观看 | 91免费观看国产 | 中文字幕在线观看日本 | 久久久久久国产精品亚洲78 | 黄免费在线观看 | 欧美一区免费在线观看 | 欧美激情奇米色 | 国产在线综合视频 | 91免费网 | 欧美精品做受xxx性少妇 | 国产999在线观看 | 成年人视频免费在线播放 | 婷婷久久婷婷 | 欧美大片www | 91色在线观看视频 | 亚洲精品一区二区在线观看 | www.国产高清 | 成人午夜精品久久久久久久3d | av中文字幕网 | 美国av大片 | 91视频91自拍 | 在线免费观看麻豆视频 | 天天干视频在线 | 中文字幕在线观看你懂的 | 韩日精品在线观看 | 天天操天天操天天操天天操天天操天天操 | 亚洲国产成人在线 | 国产成人久久久77777 | 亚洲一级二级 | 国产小视频在线看 | 亚洲免费激情 | 伊人干综合 | 一区二区三区四区在线 | 欧美一区二区精品在线 | av免费网站在线观看 | 久久香蕉国产精品麻豆粉嫩av | 亚洲电影网站 | 五月开心网 | 一级片免费观看 | 亚洲最新视频在线播放 | 亚洲黄色大片 | 亚洲成人欧美 | 欧美福利视频 | www..com黄色片 | 亚洲成人av在线 | 五月婷婷导航 | 国产人成在线视频 | 色综合久久综合中文综合网 | 亚洲九九 | 日韩h在线观看 | 99热手机在线 | 国产高清黄色 | 久久久久 免费视频 | 国内精品视频在线 | 日韩在线精品一区 | 99视频在线精品国自产拍免费观看 | 久久99爱视频 | 超碰成人免费电影 | 中文字幕在线观看免费高清完整版 | 又黄又爽又湿又无遮挡的在线视频 | 99色在线观看视频 | 午夜久久精品 | 97人人模人人爽人人少妇 | 久久国产品 | 日本久久中文字幕 | 亚洲精品久久久久www | 欧美污污视频 | 国产高清绿奴videos | 97超视频免费观看 | 最近更新好看的中文字幕 | 国产成人精品一区二区三区在线观看 | 久久综合亚洲鲁鲁五月久久 | 久久精品五月 | 精品产品国产在线不卡 | 国产九九九精品视频 | 操夜夜操 | 韩日精品视频 | 99视频网址 | 91综合视频在线观看 | av爱干 | 99久久精品午夜一区二区小说 | 91视频com | 91丨九色丨蝌蚪丨对白 | 欧美一区二区伦理片 | 国产日本在线 | 国产成人在线观看 | 在线日韩视频 | 91麻豆精品国产91 | 国产精品18久久久久久久 | 亚洲欧美日韩中文在线 | 天天插天天干天天操 | 在线a人片免费观看视频 | 精品久久久久国产免费第一页 | 天天综合网 天天 | 久久96 | 精品在线观看免费 | 91精品国产综合久久福利不卡 | 色诱亚洲精品久久久久久 | 国产精品麻豆免费版 | 亚洲高清不卡av | 久久天 | 天天操夜夜干 | 国产精品久久一 | 99国内精品 | 亚洲理论电影网 | 国产91精品在线观看 | 色综合天天狠天天透天天伊人 | 日韩成人免费在线观看 | 日韩精品一区二区三区三炮视频 | 69精品视频在线观看 | 热久久电影 | 亚洲狠狠婷婷综合久久久 | 欧美国产日韩在线视频 | 免费成人结看片 | 日韩在线视频精品 | 亚洲一区二区三区四区在线视频 | 99草视频 | 久久久久久久国产精品视频 | 99国产精品久久久久久久久久 | 亚洲欧美视频在线 | 在线观看国产 | 色偷偷88888欧美精品久久久 | 九九综合在线 | 国产精品18久久久久白浆 | 亚洲第一区在线观看 | 日韩有码网站 | 色婷婷久久久综合中文字幕 | 国产一级在线播放 | 免费精品视频在线观看 | 国产日韩欧美在线一区 | 欧美一级黄大片 | 国产成人一区二 | 美女网站视频免费都是黄 | 精品欧美乱码久久久久久 | 久久av电影| 免费视频 三区 | 久久久麻豆 | 大荫蒂欧美视频另类xxxx | 日日操天天操夜夜操 | 日韩欧美一区二区三区黑寡妇 | 久久久影片 | 亚洲国产婷婷 | 中文字幕一区二区三区久久 | 国内精品久久久久国产 | 日本一区二区免费在线观看 | 五月天激情视频 | 国产精品永久久久久久久久久 | 国产精品区免费视频 | 日韩二区在线 | 在线精品视频免费播放 | 又黄又爽的视频在线观看网站 | 热99在线视频 | 成片视频在线观看 | 亚洲欧美日韩国产一区二区三区 | 国产一区免费 | 曰本三级在线 | 久章草在线| 亚洲精品456在线播放第一页 | 黄色av网站在线免费观看 | 欧美aⅴ在线观看 | 天天操综| 久久久网址| 亚洲码国产日韩欧美高潮在线播放 | 夜夜躁日日躁狠狠久久av | 国模一二三区 | 91香蕉视频黄色 | 欧美aa级 | 伊人小视频 | 手机在线中文字幕 | 国产午夜在线观看视频 | 久久免费视频在线观看6 | 久久综合九色综合久久久精品综合 | 午夜视频二区 | 日韩电影在线一区 | 最新中文在线视频 | 久草在线免费资源站 | 丁香网五月天 | 亚洲一区二区三区四区精品 | 日本久久成人 | 精品国产乱码久久久久久久 | 日韩欧三级 | 99视频免费 | 免费黄色激情视频 | 9999国产精品| 国产精品久久久久久久午夜 | 天天干天天操av | 正在播放国产一区二区 | 夜夜躁日日躁狠狠久久av | 亚洲欧美日韩国产一区二区三区 | 亚洲欧洲日韩 | 国产原创在线观看 | 久久理论电影网 | 狠狠干天天操 | 五月婷婷中文字幕 | 国产在线观看xxx | 欧美俄罗斯性视频 | av888av.com| 国产日韩精品一区二区三区 | 一区二区三区四区久久 | 国产福利一区二区三区在线观看 | 九九九九免费视频 | 91精品国 | 日日添夜夜添 | 亚洲一区二区精品3399 | 伊人伊成久久人综合网站 | 人人干人人艹 | 午夜精品视频福利 | 久久成人精品视频 | 成年人视频在线免费 | 亚洲人xxx | 国产精品久久久久久久免费 | 精品天堂av | 手机在线小视频 | 成人网444ppp | 久久理论视频 | 狠狠色丁香婷婷综合欧美 | 精品久久在线 | 91久久国产露脸精品国产闺蜜 | 日韩精品三区四区 | 日韩中文在线观看 | 亚洲精品国产综合99久久夜夜嗨 | 色婷婷狠狠 | 成 人 黄 色 视频免费播放 | 日韩精品在线视频 | 日韩欧美视频 | 天天操天天色天天 | 丁香电影小说免费视频观看 | 97av视频| 国产精品区在线观看 | 天天激情天天干 | 久久在视频 | 日韩成人精品一区二区三区 | 蜜臀aⅴ精品一区二区三区 久久视屏网 | 免费欧美精品 | 亚洲精品免费在线视频 | 国产成人一区二区三区电影 | 国产人成在线视频 | 久久韩国免费视频 | 99精品视频在线观看播放 | 欧美狠狠色 | 日本精品视频在线观看 | 欧美一级淫片videoshd | 亚洲精品在线观看网站 | 夜夜天天干 | 免费在线观看午夜视频 | 亚洲精品免费在线观看视频 | 97色在线视频 | 天天干天天做 | 欧美极品少妇xxxxⅹ欧美极品少妇xxxx亚洲精品 | 国产夫妻性生活自拍 | 成人精品视频 | 欧美精品免费在线观看 | 色综合激情网 | 国产午夜影院 | 九九在线视频 | 国产日韩欧美视频 | 日韩高清片| 91欧美日韩国产 | 97视频播放 | 日本资源中文字幕在线 | 日韩免费在线看 | av在线最新| 精品国产电影一区 | 91福利影院在线观看 | 日本黄色免费在线 | 最近最新mv字幕免费观看 | 日本精品在线看 | 日本精品久久久久久 | 日韩在线观看高清 | 草久在线视频 | 欧美成人区 | 成人在线小视频 | 狠狠干五月天 | 波多野结衣在线中文字幕 | 国产福利av | 日韩免费观看一区二区 | 日韩在线免费小视频 | 精品久久久久久久久久岛国gif | 99久久99久久综合 | 亚洲精品国偷拍自产在线观看蜜桃 | 中文字幕二区在线观看 | 亚洲视频 在线观看 | 91桃花视频 | 91麻豆精品国产91 | 亚洲精品国产视频 | 免费在线观看成人av | 亚洲精品成人av在线 | 国产亚洲人 | 深爱婷婷久久综合 | 国产69精品久久99不卡的观看体验 | 日本中文字幕电影在线免费观看 | 99热最新网址 | 热久久精品在线 | 97在线观| 国产福利免费在线观看 | 久久久精品久久 | 亚洲精品视频网址 | 天天躁日日| 午夜精品电影一区二区在线 | 欧美大片在线看免费观看 | av蜜桃在线| 久久精品国产免费看久久精品 | 中文字幕永久在线 | 夜夜躁狠狠躁日日躁视频黑人 | 91av色| 成年人在线观看 | 久草电影免费在线观看 | 免费视频国产 | 久久久18 | 中文字幕在线观 | 色综合中文综合网 | 欧美成亚洲 | 欧美天堂视频在线 | 久色网 | 色网av | 黄色资源在线观看 | 日韩理论片在线观看 | 超碰在线色 | 五月天九九 | 精品成人在线 | www.com黄| 国产视频色 | 免费能看的av | 成人精品一区二区三区电影免费 | 国产精品日韩在线播放 | 99免费在线播放99久久免费 | a级免费观看 | 国产 日韩 中文字幕 | 国产一级性生活视频 | 国产日韩精品在线 | 久久久久久久久久久成人 | 丁香五婷 | 99久国产 | 免费av小说 | 五月综合色婷婷 | 欧美男男激情videos | 国产精品久久久视频 | 久草网免费| 亚洲在线色 | 久久久久久蜜桃一区二区 | 日韩久久精品一区二区 | 在线成人高清电影 | 69国产盗摄一区二区三区五区 | 久久精品系列 | 欧美一级性生活片 | 亚洲精品高清一区二区三区四区 | 亚洲天堂精品 | 一本一道波多野毛片中文在线 | 日本中出在线观看 | 美女视频黄频 | 成人毛片在线观看视频 | 精品久久久久久亚洲综合网站 | 欧美激情视频一二区 |