registered user is unable to update stats for hive table.

Bug #1444669 reported by Julie Thai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
High
Roberta Marton

Bug Description

Registered user is able to query hive table, but attempt to update statistics on hive table fails with ERROR[9241].

As 'qauser_cmp':
Welcome to Trafodion Command Interface
Copyright(C) 2013-2014 Hewlett-Packard Development Company, L.P.

Host Name/IP Address: localhost:37800
User Name: qauser_cmp

Connected to Trafodion

SQL>obey repo4.sql;

SQL>cqd query_cache '0';

--- SQL operation complete.

SQL>update statistics for table hive.tpch2x.nation on every column;

*** ERROR[9241] Insufficient privileges to perform the statistics request for table HIVE.TPCH2X.NATION. [2015-04-15 19:39:31]

SQL>showstats for table hive.tpch2x.nation on existing columns;

Histogram data for Table HIVE.TPCH2X.NATION
Table ID: 0

   Hist ID # Ints Rowcount UEC Colname(s)
========== ====== =========== =========== ===========================
1468601408 25 25 25 N_COMMENT
1468601415 5 25 5 N_REGIONKEY
1468601418 25 25 25 N_NAME
1468601425 25 25 25 N_NATIONKEY

--- SQL operation complete.

SQL>select count(*) from hive.tpch2x.nation;

(EXPR)
--------------------
                  25

--- 1 row(s) selected.

SQL>invoke hive.tpch2x.nation;

-- Definition of hive table NATION
-- Definition current Wed Apr 15 19:39:49 2015

  (
    N_NATIONKEY INT
  , N_NAME VARCHAR(32000 BYTES) CHARACTER SET UTF8
      COLLATE DEFAULT
  , N_REGIONKEY INT
  , N_COMMENT VARCHAR(32000 BYTES) CHARACTER SET UTF8
      COLLATE DEFAULT
  )
   /* stored as text */

--- SQL operation complete.

SQL>exit

whereas as 'trafodion':

Welcome to Trafodion Command Interface
Copyright(C) 2013-2014 Hewlett-Packard Development Company, L.P.

Host Name/IP Address: localhost:37800
User Name: trafodion

Connected to Trafodion

SQL>obey repo4.sql;

SQL>cqd query_cache '0';

--- SQL operation complete.

SQL>update statistics for table hive.tpch2x.nation on every column;

--- SQL operation complete.

SQL>showstats for table hive.tpch2x.nation on existing columns;

Histogram data for Table HIVE.TPCH2X.NATION
Table ID: 0

   Hist ID # Ints Rowcount UEC Colname(s)
========== ====== =========== =========== ===========================
1468601408 25 25 25 N_COMMENT
1468601415 5 25 5 N_REGIONKEY
1468601418 25 25 25 N_NAME
1468601425 25 25 25 N_NATIONKEY

--- SQL operation complete.

SQL>select count(*) from hive.tpch2x.nation;

(EXPR)
--------------------
                  25

--- 1 row(s) selected.

SQL>invoke hive.tpch2x.nation;

-- Definition of hive table NATION
-- Definition current Wed Apr 15 19:31:54 2015

  (
    N_NATIONKEY INT
  , N_NAME VARCHAR(32000 BYTES) CHARACTER SET UTF8
      COLLATE DEFAULT
  , N_REGIONKEY INT
  , N_COMMENT VARCHAR(32000 BYTES) CHARACTER SET UTF8
      COLLATE DEFAULT
  )
   /* stored as text */

--- SQL operation complete.

SQL>exit

Tags: sql-security
Revision history for this message
Julie Thai (julie-y-thai) wrote :

to reproduce:
1. in hive, create table junk (a int, b int);
2. instantiate trafci, specifying user/passwd of registered user other than trafodion, and issue
    update statistics for table hive.hive.junk on every column; ERROR[9241] is reported.

Paul Low (paul-low-x)
Changed in trafodion:
assignee: nobody → Roberta Marton (roberta-marton)
milestone: none → r1.2
Changed in trafodion:
status: New → In Progress
Revision history for this message
Roberta Marton (roberta-marton) wrote :

Added a check for a hive table during the authorization check to return successful.
This may change once Trafodion is Kerberized ...

Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.