Review Board 1.7.22


HIVE-3846 alter view rename NPEs with authorization on.

Review Request #10771 - Created April 25, 2013 and submitted

Teddy Choi
HIVE-3846
Reviewers
hive
hive-git
HiveOperation.ALTERVIEW_RENAME was missing.
I added it on HiveOperation and SemanticAnalyzerFactory. Also I added a test to reproduce the error as Ashutosh Chauhan mentioned and it was fixed.

Please read https://issues.apache.org/jira/browse/HIVE-3846 for more details.

 
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
Revision 48a05e8 New Change
[20] 92 lines
[+20]
93
    commandType.put(HiveParser.TOK_SHOW_ROLE_GRANT, HiveOperation.SHOW_ROLE_GRANT);
93
    commandType.put(HiveParser.TOK_SHOW_ROLE_GRANT, HiveOperation.SHOW_ROLE_GRANT);
94
    commandType.put(HiveParser.TOK_ALTERDATABASE_PROPERTIES, HiveOperation.ALTERDATABASE);
94
    commandType.put(HiveParser.TOK_ALTERDATABASE_PROPERTIES, HiveOperation.ALTERDATABASE);
95
    commandType.put(HiveParser.TOK_DESCDATABASE, HiveOperation.DESCDATABASE);
95
    commandType.put(HiveParser.TOK_DESCDATABASE, HiveOperation.DESCDATABASE);
96
    commandType.put(HiveParser.TOK_ALTERTABLE_SKEWED, HiveOperation.ALTERTABLE_SKEWED);
96
    commandType.put(HiveParser.TOK_ALTERTABLE_SKEWED, HiveOperation.ALTERTABLE_SKEWED);
97
    commandType.put(HiveParser.TOK_ANALYZE, HiveOperation.ANALYZE_TABLE);
97
    commandType.put(HiveParser.TOK_ANALYZE, HiveOperation.ANALYZE_TABLE);

    
   
98
    commandType.put(HiveParser.TOK_ALTERVIEW_RENAME, HiveOperation.ALTERVIEW_RENAME);
98
  }
99
  }
99

    
   
100

   
100
  static {
101
  static {
101
    tablePartitionCommandType.put(
102
    tablePartitionCommandType.put(
102
        HiveParser.TOK_ALTERTABLE_ALTERPARTS_PROTECTMODE,
103
        HiveParser.TOK_ALTERTABLE_ALTERPARTS_PROTECTMODE,
[+20] [20] 138 lines
ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
Revision 4b1c429 New Change
 
ql/src/test/queries/clientpositive/authorization_8.q
New File
 
ql/src/test/results/clientnegative/recursive_view.q.out
Revision 3a2618b New Change
 
ql/src/test/results/clientpositive/alter_view_rename.q.out
Revision 6a498e8 New Change
 
ql/src/test/results/clientpositive/authorization_8.q.out
New File
 
  1. ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java: Loading...
  2. ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java: Loading...
  3. ql/src/test/queries/clientpositive/authorization_8.q: Loading...
  4. ql/src/test/results/clientnegative/recursive_view.q.out: Loading...
  5. ql/src/test/results/clientpositive/alter_view_rename.q.out: Loading...
  6. ql/src/test/results/clientpositive/authorization_8.q.out: Loading...