Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.1, 2.1.1
-
None
Description
After HIVE-8839 in 1.1.0 support "alter table ... cascade" to cascade table changes to partitions as well. But NPE thrown when issue query like "alter table ... cascade" onto non-partitioned table
Sample Query:
create table test_cascade_npe (id int);
alter table test_cascade_npe add columns (name string ) cascade;
Exception stack:
2017-06-09T22:16:05,913 ERROR [main] ql.Driver: FAILED: NullPointerException null
java.lang.NullPointerException
at org.apache.hadoop.hive.metastore.Warehouse.makePartName(Warehouse.java:547)
at org.apache.hadoop.hive.metastore.Warehouse.makePartName(Warehouse.java:489)
at org.apache.hadoop.hive.ql.metadata.Partition.getName(Partition.java:198)
at org.apache.hadoop.hive.ql.hooks.Entity.computeName(Entity.java:339)
at org.apache.hadoop.hive.ql.hooks.Entity.<init>(Entity.java:208)
at org.apache.hadoop.hive.ql.hooks.WriteEntity.<init>(WriteEntity.java:104)
at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.addInputsOutputsAlterTable(DDLSemanticAnalyzer.java:1496)
at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.addInputsOutputsAlterTable(DDLSemanticAnalyzer.java:1473)
at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTableModifyCols(DDLSemanticAnalyzer.java:2685)
at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:284)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:474)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1245)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1387)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1174)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1164)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:232)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:183)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:399)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:776)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:714)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
Attachments
Attachments
Issue Links
- relates to
-
HIVE-8839 Support "alter table .. add/replace columns cascade"
- Resolved