In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what are the common functions of Hive, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
one
Mathematical function
Round (double d)
Round (double dline int n)
Floor (double d)
Ceil (double d)
Ceiling (double d)
Rand ()
Rand (int seed)
Exp (double d)
Ln (double d)
Log10 (double d)
Log2 (double d)
Log (double base,double d)
Pow (double djingheng double p)
Power (double djingheng double p)
Sqrt (double d)
Hex (bigint I)
Hex (string str)
Abs (double d)
PI ()
two
Set function
Size (Map)
Map_keys (Map)
Map_values (Map)
Array_contains (Array, value)
Sort_array (Array)
three
Type conversion function
Cast (expr as)
four
Date function
Date_add
Date_sub
Next_day
Last_day
From_unixtime (bigint unixtime, string format)
To_date (string timestamp)
Year (string date)
Month (string date)
Hour (string date)
Weekofyear (string date)
Datediff (string enddate, string startdate)
Add_months (string start_date, int num_months)
Date_format (date/timestamp/string ts, string fmt)
five
Conditional function
If (boolean testCondition, T valueTrue, T valueFalseOrNull)
Nvl (T value, T default_value)
COALESCE (T v1, T v2,...)
CASE a WHEN b THEN c [WHEN d THEN e] * [ELSE f] END
Isnull (a)
Isnotnull (a)
six
Character function
Concat (string | binary A, string | binary B...)
Concat_ws (string SEP, string A, string B...)
Length (string A)
Lower (string A) lcase (string A)
Parse_url (string urlString, string partToExtract [, string keyToExtract])
Regexp_replace (string INITIAL_STRING, string PATTERN, string REPLACEMENT)
Reverse (string A)
Split (string str, string pat)
Substr (string | binary A, int start) substring (string | binary A, int start)
seven
Aggregate function
Count (*)
Count (expr)
Count (distinct expr [, expr_.])
Sum (col)
Sum (distinct col)
Avg (col)
Avg (distinct col)
Min (col)
Max (col)
eight
Table generating function
Explode (ARRAY array)
Explode (MAP map)
Explode (ARRAY a)
Json_tuple (STRING jsonStr,p1p2, … , pn)-
Parse_url_tuple (url,partname1,partname2, … , partnameN)
These are all the contents of the article "what are the common functions of Hive?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.