[
https://issues.apache.org/jira/browse/IMPALA-7701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fredy Wijaya resolved IMPALA-7701.
----------------------------------
Resolution: Fixed
Fix Version/s: Impala 3.1.0
> 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 3.0, Impala 2.12.0
> Reporter: Fredy Wijaya
> Assignee: Fredy Wijaya
> Priority: Major
> Fix For: Impala 3.1.0
>
>
> 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 user test_user')
> >>> 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')]
> >>> cursor.execute('show grant role admin')
> >>> 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]