You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Chaoyu Tang (JIRA)" <ji...@apache.org> on 2016/07/21 19:59:20 UTC

[jira] [Updated] (HIVE-14298) NPE could be thrown in HMS when an ExpressionTree could not be made from a filter

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

Chaoyu Tang updated HIVE-14298:
-------------------------------
    Attachment: HIVE-14298.patch

When HMS could not parse or push down a partition filter such as those having clause like, PartFilterExprUtil.makeExpressionTree returns null for the exprTree, therefore generateSqlFilterForPushdown should return false.
It is quite easy to reproduce the NPE issue with following steps:
set the HMS configurations:
hive.metastore.try.direct.sql to true
hive.metastore.limit.partition.request to a certain positive integer (-1 means disabled which is default).
Run query like 
select * from sample_pt where code in ('53-5022', '53-5023') and dummy like '%1';
you will get "FAILED: SemanticException java.lang.NullPointerException"

> NPE could be thrown in HMS when an ExpressionTree could not be made from a filter
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-14298
>                 URL: https://issues.apache.org/jira/browse/HIVE-14298
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-14298.patch
>
>
> In many cases where an ExpressionTree could not be made from a filter (e.g. parser fails to parse a filter etc.) and its value is null. But this null is passed around and used by a couple of HMS methods which can cause NullPointerException.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)