Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
-
None
Description
The code path for getting partitions by filter is as follows,
protected List<Partition> getPartitionsByFilterInternal(..) { ... @Override protected boolean canUseDirectSql(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.generateSqlFilterForPushdown(ctx.getTable(), tree, filter); } ... }
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
@Override protected boolean canUseDirectSql(GetHelper<Integer> ctx) throws MetaException { try { return directSql.generateSqlFilterForPushdown(ctx.getTable(), exprTree, filter); } catch (final MetaException me) { return false; } }