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 ... cascade onto non-partitioned table
Date Sat, 10 Jun 2017 14:07:18 GMT

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

Wang Haihua updated HIVE-16877:
-------------------------------
    Description: 
NPE thrown when issue query like alter ... 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}


  was:
NPE thrown when issue query like alter ... 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;


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)


> NPE when issue query like alter ... 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: 1.2.1, 2.1.1
>            Reporter: Wang Haihua
>            Assignee: Wang Haihua
>
> NPE thrown when issue query like alter ... 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.3.15#6346)

Mime
View raw message