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

Karthik Manamcheri reassigned HIVE-20634:
-----------------------------------------


> DirectSQL does not retry in ORM mode while getting partitions by filter
> -----------------------------------------------------------------------
>
>                 Key: HIVE-20634
>                 URL: https://issues.apache.org/jira/browse/HIVE-20634
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Karthik Manamcheri
>            Assignee: Karthik Manamcheri
>            Priority: Major
>
> The code path for getting partitions by filter is as follows,
> {code:java}
>   protected List<Partition> getPartitionsByFilterInternal(..) {
>    ...
>       @Override
>       protected boolean canUseDirectSql(GetHelper<List<Partition>> ctx) 
> throws MetaException 
>      {
>         return directSql.generateSqlFilterForPushdown(ctx.getTable(), tree, 
> filter);
>       }
>    ...
>   }
> {code}
> If directSql.generateSqlFilterForPushdown throws an exception, we should be 
> returning false from canUseDirectSql instead of propagating the exception. 
> The propagation of exception causes the whole query to fail, instead of 
> retrying with JDO.
> We should have code such as
> {code:java}
>       @Override
>       protected boolean canUseDirectSql(GetHelper<Integer> ctx) throws 
> MetaException {
>         try {
>           return directSql.generateSqlFilterForPushdown(ctx.getTable(), 
> exprTree, filter);
>         } catch (final MetaException me) {
>           return false;
>         }
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to