Fredy Wijaya created IMPALA-7701:
------------------------------------

             Summary: Grant option always shows as NULL in SHOW GRANT ROLE/USER 
for any HS2 clients
                 Key: IMPALA-7701
                 URL: https://issues.apache.org/jira/browse/IMPALA-7701
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
    Affects Versions: Impala 2.12.0, Impala 3.0
            Reporter: Fredy Wijaya
            Assignee: Fredy Wijaya


In Impala shell:
{noformat}
[localhost:21000] default> show grant user test_user;
Query: show grant user test_user
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| principal_type | principal_name | scope    | database | table | column | uri 
| privilege | grant_option | create_time                   |
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| USER           | test_user        | database | foo      |       |        |    
 | owner     | true         | Thu, Oct 11 2018 11:48:57.186 |
| ROLE           | admin          | server   |          |       |        |     
| all       | false        | Thu, Oct 11 2018 11:48:48.203 |
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
Fetched 2 row(s) in 0.13s
[localhost:21000] default> show grant role admin;
Query: show grant role admin
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| scope  | database | table | column | uri | privilege | grant_option | 
create_time                   |
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| server |          |       |        |     | all       | false        | Thu, 
Oct 11 2018 11:48:48.203 |
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
Fetched 1 row(s) in 0.01s
{noformat}

Using Impyla (HS2 client):
{noformat}
>>> from impala.dbapi import connect
>>> conn = connect(host='localhost', port=21050)
>>> cursor = conn.cursor()
>>> cursor.execute('show grant role test_user')
>>> cursor.execute('show grant user fwijaya')
>>> print(cursor.fetchall())
[('USER', 'test_user', 'database', 'foo', '', '', '', 'owner', None, 'Thu, Oct 
11 2018 11:48:57.186'), ('ROLE', 'admin', 'server', '', '', '', '', 'all', 
None, 'Thu, Oct 11 2018 11:48:48.203')]
>>> print(cursor.fetchall())
[('server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to