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

Quanlong Huang resolved IMPALA-10936.
-------------------------------------
    Fix Version/s: Impala 4.0.1
                   Impala 4.1.0
       Resolution: Fixed

> StmtMetadataLoader::collectPolicyTables() should handle FailedLoadLocalTable 
> without NPE
> ----------------------------------------------------------------------------------------
>
>                 Key: IMPALA-10936
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10936
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.0.0
>            Reporter: Joe McDonnell
>            Assignee: Quanlong Huang
>            Priority: Major
>             Fix For: Impala 4.1.0, Impala 4.0.1
>
>
> If table loading fails, then it result in a FailedLoadLocalTable, which uses 
> this constructor for LocalTable:
> {noformat}
>   protected LocalTable(LocalDb db, String tblName) {
>     this.db_ = Preconditions.checkNotNull(db);
>     this.name_ = tblName;
>     this.ref_ = null;
>     this.msTable_ = null;
>     this.cols_ = null;
>     this.tableStats_ = null;
>   }{noformat}
> Since cols_ and other fields are null, the code in 
> StmtMetadataLoader::collectPolicyTables(), which calls 
> LocalTable::getColumnsInHiveOrder() will throw a NullPointerException when 
> trying to access cols_ in getNonClusteringColumns(). 
> This will fail the query with a NullPointerException, even though the 
> underlying problem came from failing to load the table metadata. We should 
> handle this to avoid the NullPointerException. That may happen as part of 
> StmtMetadataLoader::collectPolicyTables() or 
> StmtMetadataLoader::getMissingTables().



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to