if (filterBuffer.hasError()) return;
table, params, joins, dbHasJoinCastBug, defaultPartName, dbType, schema); tree.accept(visitor); if (visitor.filterBuffer.hasError()) { LOG.info("Unable to push down SQL filter: " + visitor.filterBuffer.getErrorMessage()); return null;
if (queryBuilder.hasError()) { assert !isValidatedFilter; LOG.info("JDO filter pushdown cannot be used: {}", queryBuilder.getErrorMessage());
if (filterBuffer.hasError()) return;
if (filterBuffer.hasError()) return;
if (queryBuilder.hasError()) { assert !isValidatedFilter; LOG.info("JDO filter pushdown cannot be used: {}", queryBuilder.getErrorMessage());
int partitionColumnCount = table.getPartitionKeys().size(); int partitionColumnIndex = getPartColIndexForFilter(table, filterBuilder); if (filterBuilder.hasError()) return; String valueAsString = getJdoFilterPushdownParam( table, partitionColumnIndex, filterBuilder, canPushDownIntegral); if (filterBuilder.hasError()) return;
int partitionColumnCount = table.getPartitionKeys().size(); int partitionColumnIndex = getPartColIndexForFilter(table, filterBuilder); if (filterBuilder.hasError()) return; String valueAsString = getJdoFilterPushdownParam( table, partitionColumnIndex, filterBuilder, canPushDownIntegral); if (filterBuilder.hasError()) return;
if (queryBuilder.hasError()) { assert !isValidatedFilter; LOG.info("JDO filter pushdown cannot be used: " + queryBuilder.getErrorMessage());
if (filterBuffer.hasError()) return; if (lhs != null) { filterBuffer.append (" (");
if (filterBuffer.hasError()) return; if (lhs != null) { filterBuffer.append (" (");
if (queryBuilder.hasError()) { assert !isValidatedFilter; LOG.info("JDO filter pushdown cannot be used: " + queryBuilder.getErrorMessage());
/** * Generate the ANSI SQL92 filter for the given expression tree * @param table the table being queried * @param params the ordered parameters for the resulting expression * @param joins the joins necessary for the resulting expression * @return the string representation of the expression tree */ private static String generateSqlFilter(Table table, ExpressionTree tree, List<Object> params, List<String> joins, boolean dbHasJoinCastBug) throws MetaException { assert table != null; if (tree.getRoot() == null) { return ""; } PartitionFilterGenerator visitor = new PartitionFilterGenerator( table, params, joins, dbHasJoinCastBug); tree.accept(visitor); if (visitor.filterBuffer.hasError()) { LOG.info("Unable to push down SQL filter: " + visitor.filterBuffer.getErrorMessage()); return null; } // Some joins might be null (see processNode for LeafNode), clean them up. for (int i = 0; i < joins.size(); ++i) { if (joins.get(i) != null) continue; joins.remove(i--); } return "(" + visitor.filterBuffer.getFilter() + ")"; }
/** * Generate the ANSI SQL92 filter for the given expression tree * @param table the table being queried * @param params the ordered parameters for the resulting expression * @param joins the joins necessary for the resulting expression * @return the string representation of the expression tree */ private static String generateSqlFilter(Table table, ExpressionTree tree, List<Object> params, List<String> joins, boolean dbHasJoinCastBug) throws MetaException { assert table != null; if (tree.getRoot() == null) { return ""; } PartitionFilterGenerator visitor = new PartitionFilterGenerator( table, params, joins, dbHasJoinCastBug); tree.accept(visitor); if (visitor.filterBuffer.hasError()) { LOG.info("Unable to push down SQL filter: " + visitor.filterBuffer.getErrorMessage()); return null; } // Some joins might be null (see processNode for LeafNode), clean them up. for (int i = 0; i < joins.size(); ++i) { if (joins.get(i) != null) continue; joins.remove(i--); } return "(" + visitor.filterBuffer.getFilter() + ")"; }
@Override protected boolean shouldStop() { return filterBuffer.hasError(); }
@Override protected boolean shouldStop() { return filterBuffer.hasError(); }
int partitionColumnCount = table.getPartitionKeys().size(); int partitionColumnIndex = getPartColIndexForFilter(table, filterBuilder); if (filterBuilder.hasError()) return; String valueAsString = getJdoFilterPushdownParam( table, partitionColumnIndex, filterBuilder, canPushDownIntegral); if (filterBuilder.hasError()) return;
if (filterBuffer.hasError()) return; if (lhs != null) { filterBuffer.append (" (");
@Override protected boolean shouldStop() { return filterBuffer.hasError(); }