@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.getPartitionsViaSqlFilter(catName, dbName, tblName, partNames); } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.getPartitionsViaSqlFilter(filter, (maxParts < 0) ? null : (int)maxParts); }
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { // If we have some sort of expression tree, try SQL filter pushdown. List<Partition> result = null; if (exprTree != null) { SqlFilterForPushdown filter = new SqlFilterForPushdown(); if (directSql.generateSqlFilterForPushdown(ctx.getTable(), exprTree, defaultPartitionName, filter)) { return directSql.getPartitionsViaSqlFilter(filter, null); } } // We couldn't do SQL filter pushdown. Get names via normal means. List<String> partNames = new LinkedList<>(); hasUnknownPartitions.set(getPartitionNamesPrunedByExprNoTxn( ctx.getTable(), expr, defaultPartitionName, maxParts, partNames)); return directSql.getPartitionsViaSqlFilter(catName, dbName, tblName, partNames); }
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.getPartitionsViaSqlFilter(dbName, tblName, partNames); } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.getPartitionsViaSqlFilter(filter, (maxParts < 0) ? null : (int)maxParts); }
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.getPartitionsViaSqlFilter(dbName, tblName, partNames); } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { return directSql.getPartitionsViaSqlFilter(catName, dbName, tblName, partNames); } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { // If we have some sort of expression tree, try SQL filter pushdown. List<Partition> result = null; if (exprTree != null) { result = directSql.getPartitionsViaSqlFilter(ctx.getTable(), exprTree, null); } if (result == null) { // We couldn't do SQL filter pushdown. Get names via normal means. List<String> partNames = new LinkedList<String>(); hasUnknownPartitions.set(getPartitionNamesPrunedByExprNoTxn( ctx.getTable(), expr, defaultPartitionName, maxParts, partNames)); result = directSql.getPartitionsViaSqlFilter(dbName, tblName, partNames); } return result; } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { // If we have some sort of expression tree, try SQL filter pushdown. List<Partition> result = null; if (exprTree != null) { result = directSql.getPartitionsViaSqlFilter(ctx.getTable(), exprTree, null); } if (result == null) { // We couldn't do SQL filter pushdown. Get names via normal means. List<String> partNames = new LinkedList<String>(); hasUnknownPartitions.set(getPartitionNamesPrunedByExprNoTxn( ctx.getTable(), expr, defaultPartitionName, maxParts, partNames)); result = directSql.getPartitionsViaSqlFilter(dbName, tblName, partNames); } return result; } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { List<Partition> parts = directSql.getPartitionsViaSqlFilter( ctx.getTable(), tree, (maxParts < 0) ? null : (int)maxParts); if (parts == null) { // Cannot push down SQL filter. The message has been logged internally. // This is not an error so don't roll back, just go to JDO. ctx.disableDirectSql(); } return parts; } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { List<Partition> parts = directSql.getPartitionsViaSqlFilter( ctx.getTable(), tree, (maxParts < 0) ? null : (int)maxParts); if (parts == null) { // Cannot push down SQL filter. The message has been logged internally. // This is not an error so don't roll back, just go to JDO. ctx.disableDirectSql(); } return parts; } @Override
@Override protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException { // If we have some sort of expression tree, try SQL filter pushdown. List<Partition> result = null; if (exprTree != null) { SqlFilterForPushdown filter = new SqlFilterForPushdown(); if (directSql.generateSqlFilterForPushdown(ctx.getTable(), exprTree, filter)) { return directSql.getPartitionsViaSqlFilter(filter, null); } } // We couldn't do SQL filter pushdown. Get names via normal means. List<String> partNames = new LinkedList<>(); hasUnknownPartitions.set(getPartitionNamesPrunedByExprNoTxn( ctx.getTable(), expr, defaultPartitionName, maxParts, partNames)); return directSql.getPartitionsViaSqlFilter(catName, dbName, tblName, partNames); }
if (doUseDirectSql) { try { results = directSql.getPartitionsViaSqlFilter(dbName, tblName, partNames); } catch (Exception ex) { LOG.error("Direct SQL failed, falling back to ORM", ex);
try { Table table = convertToTable(mtable); results = directSql.getPartitionsViaSqlFilter(table, dbName, tblName, parser); } catch (Exception ex) { LOG.error("Direct SQL failed, falling back to ORM", ex);