hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wang Haihua (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-16877) NPE when issue query like alter table ... cascade onto non-partitioned table
Date Sun, 25 Jun 2017 17:13:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-16877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Wang Haihua updated HIVE-16877:
-------------------------------
    Status: Patch Available  (was: In Progress)

> NPE when issue query like alter table ... cascade onto non-partitioned table 
> -----------------------------------------------------------------------------
>
>                 Key: HIVE-16877
>                 URL: https://issues.apache.org/jira/browse/HIVE-16877
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 2.1.1, 1.2.1
>            Reporter: Wang Haihua
>            Assignee: Wang Haihua
>             Fix For: 2.2.0
>
>         Attachments: HIVE-16877.1.patch, HIVE-16877.2.patch
>
>
> 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:
> {code}
> create table test_cascade_npe (id int);
> alter table test_cascade_npe add columns (name string ) cascade;
> {code}
> Exception stack:
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message