private static ExprNodeGenericFuncDesc extractResidualCondition(IndexPredicateAnalyzer analyzer, List<IndexSearchCondition> searchConditions, ExprNodeGenericFuncDesc inputExpr) { if (inputExpr == null) { return analyzer.translateOriginalConditions(searchConditions); } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(analyzer.translateOriginalConditions(searchConditions)); children.add(inputExpr); return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
private static ExprNodeGenericFuncDesc extractStorageHandlerCondition(IndexPredicateAnalyzer analyzer, List<IndexSearchCondition> searchConditions, ExprNodeGenericFuncDesc inputExpr) { if (inputExpr == null) { return analyzer.translateSearchConditions(searchConditions); } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(analyzer.translateSearchConditions(searchConditions)); children.add(inputExpr); return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
/** * Translates original conditions back to ExprNodeDesc form (as * a left-deep conjunction). * * @param searchConditions (typically produced by analyzePredicate) * * @return ExprNodeGenericFuncDesc form of search conditions */ public ExprNodeGenericFuncDesc translateOriginalConditions( List<IndexSearchCondition> searchConditions) { ExprNodeGenericFuncDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getOriginalExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getOriginalExpr()); expr = new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); } return expr; }
/** * bind two predicates by AND op */ public static ExprNodeGenericFuncDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next) { final List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2); if (FunctionRegistry.isOpAnd(prev)) { children.addAll(prev.getChildren()); } else { children.add(prev); } if (FunctionRegistry.isOpAnd(next)) { children.addAll(next.getChildren()); } else { children.add(next); } return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
/** * Translates search conditions back to ExprNodeDesc form (as * a left-deep conjunction). * * @param searchConditions (typically produced by analyzePredicate) * * @return ExprNodeGenericFuncDesc form of search conditions */ public ExprNodeGenericFuncDesc translateSearchConditions( List<IndexSearchCondition> searchConditions) { ExprNodeGenericFuncDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getIndexExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getIndexExpr()); expr = new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); } return expr; }
/** * bind two predicates by AND op */ public static ExprNodeGenericFuncDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next) { final List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2); if (FunctionRegistry.isOpAnd(prev)) { children.addAll(prev.getChildren()); } else { children.add(prev); } if (FunctionRegistry.isOpAnd(next)) { children.addAll(next.getChildren()); } else { children.add(next); } return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
/** * Translates search conditions back to ExprNodeDesc form (as * a left-deep conjunction). * * @param searchConditions (typically produced by analyzePredicate) * * @return ExprNodeGenericFuncDesc form of search conditions */ public ExprNodeGenericFuncDesc translateSearchConditions( List<IndexSearchCondition> searchConditions) { ExprNodeGenericFuncDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getIndexExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getIndexExpr()); expr = new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); } return expr; }
/** * Translates original conditions back to ExprNodeDesc form (as * a left-deep conjunction). * * @param searchConditions (typically produced by analyzePredicate) * * @return ExprNodeGenericFuncDesc form of search conditions */ public ExprNodeGenericFuncDesc translateOriginalConditions( List<IndexSearchCondition> searchConditions) { ExprNodeGenericFuncDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getOriginalExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getOriginalExpr()); expr = new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); } return expr; }
return new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), residuals);
return new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), residuals);
if (jop.getConf().getResidualFilterExprs().size() > 1) { pred = new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), jop.getConf().getResidualFilterExprs()); } else { if (jop.getConf().getResidualFilterExprs().size() > 1) { pred = new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), jop.getConf().getResidualFilterExprs()); } else {
/** * Translates search conditions back to ExprNodeDesc form (as a left-deep * conjunction). * * @param searchConditions (typically produced by analyzePredicate) * @return ExprNodeGenericFuncDesc form of search conditions */ public ExprNodeGenericFuncDesc translateSearchConditions(List<IndexSearchCondition> searchConditions) { ExprNodeGenericFuncDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getComparisonExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getComparisonExpr()); expr = new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry .getGenericUDFForAnd(), children); } return expr; }
.getGenericUDFForAnd(), residuals);
/** * bind two predicates by AND op */ public static ExprNodeGenericFuncDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next) { List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2); children.add(prev); children.add(next); return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); }
/** * Translates search conditions back to ExprNodeDesc form (as * a left-deep conjunction). * * @param searchConditions (typically produced by analyzePredicate) * * @return ExprNodeGenericFuncDesc form of search conditions */ public ExprNodeGenericFuncDesc translateSearchConditions( List<IndexSearchCondition> searchConditions) { ExprNodeGenericFuncDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getComparisonExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getComparisonExpr()); expr = new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); } return expr; }
/** * Translates search conditions back to ExprNodeDesc form (as * a left-deep conjunction). * * @param searchConditions (typically produced by analyzePredicate) * * @return ExprNodeDesc form of search conditions */ public ExprNodeDesc translateSearchConditions( List<IndexSearchCondition> searchConditions) { ExprNodeDesc expr = null; for (IndexSearchCondition searchCondition : searchConditions) { if (expr == null) { expr = searchCondition.getComparisonExpr(); continue; } List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(); children.add(expr); children.add(searchCondition.getComparisonExpr()); expr = new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children); } return expr; } }
return new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), residuals);
children.add(preds.get(i)); condn = new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), children);
return new ExprNodeGenericFuncDesc( TypeInfoFactory.booleanTypeInfo, FunctionRegistry.getGenericUDFForAnd(), residuals);