You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Matyas Orhidi (JIRA)" <ji...@apache.org> on 2017/04/27 12:58:04 UTC
[jira] [Created] (HIVE-16551) logged_in_user() UDF returns NULL
value in Hive CLI and SparkSQL
Matyas Orhidi created HIVE-16551:
------------------------------------
Summary: logged_in_user() UDF returns NULL value in Hive CLI and SparkSQL
Key: HIVE-16551
URL: https://issues.apache.org/jira/browse/HIVE-16551
Project: Hive
Issue Type: Bug
Reporter: Matyas Orhidi
There is a recently added UDF defined in [HIVE-14100] which would return the logged in user independently of the configured authenticator, however it is not working as expected and returns NULL in HiveCLI and SparkSql on a Kerberized cluster:
beeline> select logged_in_user();
INFO : Compiling command(queryId=hive_20170426053636_82858063-792c-4772-8c3b-fccc0ba38afb): select logged_in_user()
INFO : Semantic Analysis Completed
INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:_c0, type:string, comment:null)], properties:null)
INFO : Completed compiling command(queryId=hive_20170426053636_82858063-792c-4772-8c3b-fccc0ba38afb); Time taken: 0.184 seconds
INFO : Executing command(queryId=hive_20170426053636_82858063-792c-4772-8c3b-fccc0ba38afb): select logged_in_user()
INFO : Completed executing command(queryId=hive_20170426053636_82858063-792c-4772-8c3b-fccc0ba38afb); Time taken: 0.003 seconds
INFO : OK
+--------+--+
| _c0 |
+--------+--+
| admin |
+--------+--+
1 row selected (0.234 seconds)
spark> val sqlContext = new org.apache.spark.sql.hive.HiveContext(sc)
sqlContext: org.apache.spark.sql.hive.HiveContext = org.apache.spark.sql.hive.HiveContext@4f1b2ea
spark> sqlContext.sql("select logged_in_user()").show()
+----+
| _c0|
+----+
|null|
+----+
hive> select logged_in_user();
OK
NULL
Time taken: 0.115 seconds, Fetched: 1 row(s)
hive>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)