Hive function table

Source: Internet
Author: User
Tags timestamp to date

I. relational operation: 4

1. Equivalent comparison: = 4

2. Non-equivalent comparison: <> 4

3. Less than comparison: <4

4. Comparison of values smaller than or equal to: <= 4

5. Greater than comparison:> 5

6. Comparison greater than or equal to:> = 5

7. null value judgment: Is null 5

8. non-null judgment: Is not null 6

9. Comparison of like: Like 6

10. java like Operation: rlike 6

11. Regexp operation: Regexp 7

Ii. mathematical operations: 7

1. addition operation: + 7

2. subtraction:-7

3. Multiplication operation: * 8

4. division operation:/8

5. remainder operation: % 8

6. Bit and operation: & 9

7. Bit or operation: | 9

8. bitwise OR operation: ^ 9

9. bitwise reverse operation :~ 10

Iii. logical operations: 10

1. Logic and operation: and 10

2. Logic or operation: Or 10

3. Logical non-operation: Not 10

Iv. Numerical Calculation 11

1. Take the entire function: Round 11

2. Specify the precision of the entire function: Round 11

3. Down the entire function: Floor 11

4. rounded up the entire function: Ceil 12

5. rounded up the entire function: ceiling 12

6. Random Number function: Rand 12

7. Natural exponent function: EXP 13

8. Base-10 logarithm function: log10 13

9. Base-2 logarithm function: log2 13

10. logarithm function: log 13

11. Power Operation Function: pow 14

12. Power Calculation function: Power 14

13. Square Function: SQRT 14

14. Binary functions: Bin 14

15. hexadecimal functions: Hex 15

16. invert the hexadecimal function: unhex 15

17. hexadecimal conversion function: Conv 15

18. Absolute Value Function: ABS 16

19. Positive remainder function: pmod 16

20. sine function: sin 16

21. arcsin function: asin 16

22. cosine function: cos 17

23. arccosine function: ACOs 17

24. Positive function: Positive 17

25. Negative function: Negative 17

V. Date functions 18

1. UNIX timestamp to date function: from_unixtime 18

2. Obtain the current UNIX timestamp function: unix_timestamp 18

3. date to Unix timestamp function: unix_timestamp 18

4. Specify the format date to Unix timestamp function: unix_timestamp 18

5. Date and time to date function: to_date 19

6. date to year function: year 19

7. date to month function: month 19

8. date to day function: day 19

9. date to hour function: hour 20

10. date to minute function: minute 20

11. date to second function: Second 20

12. date to week function: weekofyear 20

13. Date comparison function: datediff 21

14. Date addition function: date_add 21

15. Date reduction function: date_sub 21

Vi. Conditional functions 21

1. If function: If 21

2. Non-empty search function: coalesce 22

3. Conditional judgment function: Case 22

4. Conditional judgment function: Case 22

VII. String functions 23

1. String Length function: length 23

2. String inversion function: reverse 23

3. String connection function: Concat 23

4. concatenation function with separator string: concat_ws 23

5. String truncation function: substr, substring 24

6. String truncation function: substr, substring 24

7. String-to-UPPERCASE function: Upper, ucase 24

8. string to lowercase function: lower, lcase 25

9. Space Removing function: trim 25

10. left-side space function: ltrim 25

11. Remove the space function on the right: rtrim 25

12. Regular Expression replacement function: regexp_replace 26

13. Regular Expression parsing function: regexp_extract 26

14. URL parsing function: parse_url 26

15. JSON parsing function: get_json_object 27

16. Space string function: Space 27

17. Repeated string function: Repeat 27

18. ASCII functions with the first character: ASCII 28

19. Left complement function: lpad 28

20. Right complement function: rpad 28

21. Split string function: Split 28

22. Set query function: find_in_set 29

8. Set statistical functions 29

1. Count statistical function: Count 29

2. Sum Statistical function: Sum 29

3. Average statistical function: AVG 30

4. Minimum statistical function: min 30

5. Maximum statistical function: Max 30

6. Non-empty set overall variable function: var_pop 30

7. Non-empty set sample variable function: var_samp 31

8. General Standard Deviation Function: stddev_pop 31

9. Sample Standard Deviation Function: stddev_samp 31

10. Median function: percentile 31

11. Median function: percentile 31

12. Approximate median function: percentile_approx 32

13. Approximate median function: percentile_approx 32

14. histogram: histogram_numeric 32

9. Composite build operation 32

1. Map Type Construction: Map 32

2. struct type construction: struct 33

3. array type construction: array 33

10. Complex access operations 33

1. array type access: A [n] 33

2. MAP access: M [Key] 34

3. struct type access: S. x 34

11. Complex Type length statistical function 34

1. Map type length function: size (Map <K. V>)
34

2. array type length function: size (array <t>)
34

3. type conversion functions
35

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.