Wednesday 7 September 2022

Hive: cos: Return cosine of the value

Signature

cos(n)

 

hive> SELECT * FROM emp;
OK
emp.id	emp.name	emp.hobbies	emp.technology_experience	emp.gender_age	emp.rating
1	Hari	["Football","Cricket"]	{"Java":"3.4Yrs","C":"4.5Yrs"}	{"gender":"Male","age":30}	-1.5
2	Chamu	["Trekking","Watching movies"]	{"Selenium":"5.6Yrs"}	{"gender":"Feale","age":38}	3.0
3	Sailu	["Chess","Listening to music"]	{"EmbeddedC":"9Yrs"}	{"gender":"Femle","age":32}	2.5
4	Gopi	["Cricket"]	{"Datastage":"11Yrs"}	{"gender":"Male","age":32}	-0.7
Time taken: 0.043 seconds, Fetched: 4 row(s)
hive> ;
hive> ;
hive> SELECT rating,cos(rating) FROM emp;
OK
rating	_c1
-1.5	0.0707372016677029
3.0	-0.9899924966004454
2.5	-0.8011436155469337
-0.7	0.7648421872844885
Time taken: 0.047 seconds, Fetched: 4 row(s)

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment