@Override public Set<String> getBindingNames() { return tupleExpr.getBindingNames(); }
@Override public String getSignature() { return "AccumuloIndexSet(" + tablename + ") : " + Joiner.on(", ").join(this.getTupleExpr().getBindingNames()); }
public boolean supportsBindingSet(Set<String> bindingNames) { final Collection<Set<String>> values = supportedVarOrders.values(); final Set<String> bNames = Sets.newHashSet(); final Set<String> bNamesWithConstants = Sets.newHashSet(); for (final String s : this.getTupleExpr().getBindingNames()) { if (bindingNames.contains(s)) { bNames.add(s); bNamesWithConstants.add(s); } else if(s.startsWith(CONST_PREFIX)) { bNamesWithConstants.add(s); } } return values.contains(bNames) || values.contains(bNamesWithConstants); }
@Override public void meet(final Projection node) throws Exception { final Set<String> bindingNames = node.getBindingNames(); if(varOrder == null) { varOrder = new VariableOrder(bindingNames); } if(queryType == null) { queryType = QueryType.PROJECTION; } super.meet(node); }
@Override public void meet(Projection node) throws RepositoryException { TupleExpr arg = node.getArg(); if (arg instanceof StatementPattern && arg.getBindingNames().equals(node.getBindingNames())) { meetNode(node); } else { arg.visit(this); if (patternNode == null) return; Map<String, String> map = new HashMap<String, String>(); for (ProjectionElem e : node.getProjectionElemList().getElements()) { String source = variables.get(e.getSourceName()); if (source == null) { source = safe(e.getSourceName()); } map.put(e.getTargetName(), source); } this.variables = map; this.patternNode = node; } }
@Override public void meet(Projection node) throws RepositoryException { TupleExpr arg = node.getArg(); if (arg instanceof StatementPattern && arg.getBindingNames().equals(node.getBindingNames())) { meetNode(node); } else { arg.visit(this); if (patternNode == null) { return; } Map<String, String> map = new HashMap<String, String>(); for (ProjectionElem e : node.getProjectionElemList().getElements()) { String source = variables.get(e.getSourceName()); if (source == null) { source = safe(e.getSourceName()); } map.put(e.getTargetName(), source); } this.variables = map; this.patternNode = node; } }
final Multimap<String, BindingSet> bindingSetHashMap = HashMultimap.create(); HashJoinType joinType = HashJoinType.CONSTANT_JOIN_VAR; final Set<String> unAssuredVariables = Sets.difference(getTupleExpr().getBindingNames(), getTupleExpr().getAssuredBindingNames()); boolean useColumnScan = false; boolean isCrossProd = false;