Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-7701

Grant option always shows as NULL in SHOW GRANT ROLE/USER for any HS2 clients

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 3.0, Impala 2.12.0
    • Impala 3.1.0
    • Frontend
    • None
    • ghx-label-1

    Description

      In Impala shell:

      [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
      

      Using Impyla (HS2 client):

      >>> 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')]
      

      Attachments

        Activity

          People

            fredyw Fredy Wijaya
            fredyw Fredy Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: