private boolean isCriteriaValid(List<Criteria> joinCriteria, QueryMetadataInterface metadata, PlanNode join) { if (joinCriteria.isEmpty()) { return false; } Set<GroupSymbol> groups = join.getGroups(); for (Criteria crit : joinCriteria) { if (JoinUtil.isNullDependent(metadata, groups, crit)) { return false; } } return true; }
private boolean isCriteriaValid(List<Criteria> joinCriteria, QueryMetadataInterface metadata, PlanNode join) { if (joinCriteria.isEmpty()) { return false; } Set<GroupSymbol> groups = join.getGroups(); for (Criteria crit : joinCriteria) { if (JoinUtil.isNullDependent(metadata, groups, crit)) { return false; } } return true; }
private boolean isCriteriaValid(List<Criteria> joinCriteria, QueryMetadataInterface metadata, PlanNode join) { if (joinCriteria.isEmpty()) { return false; } Set<GroupSymbol> groups = join.getGroups(); for (Criteria crit : joinCriteria) { if (JoinUtil.isNullDependent(metadata, groups, crit)) { return false; } } return true; }
return false; if (checkForNullDependent && JoinUtil.isNullDependent(metadata, groups, SymbolMap.getExpression(symbol))) { return false;
return false; if (checkForNullDependent && JoinUtil.isNullDependent(metadata, groups, SymbolMap.getExpression(symbol))) { return false;
return false; if (checkForNullDependent && JoinUtil.isNullDependent(metadata, groups, SymbolMap.getExpression(symbol))) { return false;
private void helpTestNullDependent(String expressionSQL, boolean dependent) throws QueryParserException, QueryResolverException, QueryMetadataException, TeiidComponentException { List<GroupSymbol> innerGroups = new ArrayList<GroupSymbol>(); innerGroups.add(new GroupSymbol("pm1.g1")); //$NON-NLS-1$ Expression expr = QueryParser.getQueryParser().parseExpression(expressionSQL); ResolverVisitor.resolveLanguageObject(expr, RealMetadataFactory.example1Cached()); assertEquals(dependent, JoinUtil.isNullDependent(RealMetadataFactory.example1Cached(), innerGroups, expr)); }
boolean isNullDepdendent = isNullDependent(metadata, innerGroups, crit); boolean isNullDepdendentOther = isNullDependent(metadata, outerGroups, crit);
boolean isNullDepdendent = isNullDependent(metadata, innerGroups, crit); boolean isNullDepdendentOther = isNullDependent(metadata, outerGroups, crit);
/** * Assumes that pm1.g1 is the only inner group */ private void helpTestNullDependentVisitor(String critSQL, boolean dependent) throws QueryParserException, QueryResolverException, QueryMetadataException, TeiidComponentException { List<GroupSymbol> innerGroups = new ArrayList<GroupSymbol>(); innerGroups.add(new GroupSymbol("pm1.g1")); //$NON-NLS-1$ Criteria crit = QueryParser.getQueryParser().parseCriteria(critSQL); QueryResolver.resolveCriteria(crit, RealMetadataFactory.example1Cached()); assertEquals(dependent, JoinUtil.isNullDependent(RealMetadataFactory.example1Cached(), innerGroups, crit)); }
boolean isNullDepdendent = isNullDependent(metadata, innerGroups, crit); boolean isNullDepdendentOther = isNullDependent(metadata, outerGroups, crit);
List<Criteria> parts = Criteria.separateCriteriaByAnd(c); for (Criteria criteria : parts) { if (!JoinUtil.isNullDependent(metadata, innerGroups, criteria)) { return true;
List<Criteria> parts = Criteria.separateCriteriaByAnd(c); for (Criteria criteria : parts) { if (!JoinUtil.isNullDependent(metadata, innerGroups, criteria)) { return true;
List<Criteria> parts = Criteria.separateCriteriaByAnd(c); for (Criteria criteria : parts) { if (!JoinUtil.isNullDependent(metadata, innerGroups, criteria)) { return true;
return null; if (as.getArgs().length == 1 && JoinUtil.isNullDependent(metadata, innerGroups, as.getArg(0))) { return null;
return null; if (as.getArgs().length == 1 && JoinUtil.isNullDependent(metadata, innerGroups, as.getArg(0))) { return null;
return null; if (as.getArgs().length == 1 && JoinUtil.isNullDependent(metadata, innerGroups, as.getArg(0))) { return null;