Friday 9 September 2022

Hive: exp: Return e to the power n

Signature

exp(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.041 seconds, Fetched: 4 row(s)
hive> ;
hive> ;
hive> SELECT rating,exp(rating) FROM emp;
OK
rating	_c1
-1.5	0.22313016014842982
3.0	20.085536923187668
2.5	12.182493960703473
-0.7	0.4965853037914095
Time taken: 0.06 seconds, Fetched: 4 row(s)

 


Previous                                                    Next                                                    Home

No comments:

Post a Comment