i want to use the hive built-in  functions in saprk.

i tried current_username() function in spark local mode. i am getting the below error. 
Error: org.apache.spark.sql.AnalysisException: Undefined function: 'current_user'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 7 (state=,code=0)

So how can i use/access the hive built in fucntion in spark?