Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E787F18BD9 for ; Thu, 24 Mar 2016 22:04:25 +0000 (UTC) Received: (qmail 95871 invoked by uid 500); 24 Mar 2016 22:04:25 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 95848 invoked by uid 500); 24 Mar 2016 22:04:25 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 95824 invoked by uid 99); 24 Mar 2016 22:04:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2016 22:04:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 843EE2C14F8 for ; Thu, 24 Mar 2016 22:04:25 +0000 (UTC) Date: Thu, 24 Mar 2016 22:04:25 +0000 (UTC) From: "Lefty Leverenz (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9143) select user(), current_user() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-9143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15211028#comment-15211028 ] Lefty Leverenz commented on HIVE-9143: -------------------------------------- Um ... I vaguely recall something about users being defined externally so there aren't any create/drop commands for them. Is that correct? > select user(), current_user() > ----------------------------- > > Key: HIVE-9143 > URL: https://issues.apache.org/jira/browse/HIVE-9143 > Project: Hive > Issue Type: Improvement > Affects Versions: 0.13.0 > Reporter: Hari Sekhon > Assignee: Alexander Pivovarov > Priority: Minor > Fix For: 1.2.0 > > Attachments: HIVE-9143.1.patch, HIVE-9143.2.patch, HIVE-9143.3.patch > > > Feature request to add support for determining in HQL session which user I am currently connected as - an old MySQL ability: > {code}mysql> select user(), current_user(); > +----------------+----------------+ > | user() | current_user() | > +----------------+----------------+ > | root@localhost | root@localhost | > +----------------+----------------+ > 1 row in set (0.00 sec) > {code} > which doesn't seem to have a counterpart in Hive at this time: > {code}0: jdbc:hive2://:100> select user(); > Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Invalid function 'user' (state=42000,code=40000) > 0: jdbc:hive2://:100> select current_user(); > Error: Error while compiling statement: FAILED: SemanticException [Error 10011]: Line 1:7 Invalid function 'current_user' (state=42000,code=10011){code} > Regards, > Hari Sekhon > http://www.linkedin.com/in/harisekhon -- This message was sent by Atlassian JIRA (v6.3.4#6332)