protected FilterNode filter(final IValueExpressionNode f) { return new FilterNode(f); }
/** * Checks whether the filter node's value expression node is in CNF. */ static public boolean isCNF(final FilterNode filter) { return isCNF(filter.getValueExpressionNode()); }
@Override public IValueExpressionNode getValueExpressionNode() { return (IValueExpressionNode) get(0); }
@Override public String toString(final int indent) { final StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append(indent(indent)); sb.append("FILTER( ").append(getValueExpressionNode().toString(indent+1)).append(" )"); // if (getQueryHints() != null) { // sb.append("\n"); // sb.append(indent(indent)); // sb.append(Annotations.QUERY_HINTS); // sb.append("="); // sb.append(getQueryHints().toString()); // } return sb.toString(); }
/** * Optimize a single FilterNode. We want to replace a search in search * function node with an In function node. */ protected void optimize(final AST2BOpContext ctx, final StaticAnalysis sa, final JoinGroupNode group, final FilterNode filterNode) { final IValueExpressionNode veNode = filterNode.getValueExpressionNode(); if (veNode instanceof FunctionNode) { final FunctionNode funcNode = (FunctionNode) veNode; if (funcNode.getFunctionURI().equals(BDS.SEARCH_IN_SEARCH)) { filterNode.setArg(0, convert(ctx, funcNode)); } } }
final FilterNode filterNode = new FilterNode(// new FunctionNode(FunctionRegistry.BOUND, null,// scalarValues new ValueExpressionNode[] {// filterNode.getValueExpressionNode());
final GlobalAnnotations globals = new GlobalAnnotations( context.getLexiconNamespace(), context.getTimestamp()); AST2BOpUtility.toVE(getBOpContext(), globals, exists.getValueExpressionNode()); AST2BOpUtility.toVE(getBOpContext(), globals, notExists.getValueExpressionNode()); assertEquals(requiredBound, exists.getRequiredBound(sa)); assertEquals(desiredBound, exists.getDesiredBound(sa)); assertEquals(requiredBound, notExists.getRequiredBound(sa)); assertEquals(desiredBound, notExists.getDesiredBound(sa));
final FilterNode filterNode = new FilterNode( new FunctionNode(// ); AST2BOpUtility.toVE(getBOpContext(), globals, filterNode.getValueExpressionNode()); expectedWhereClause.addChild(filterNode);
final GlobalAnnotations globals = new GlobalAnnotations( context.getLexiconNamespace(), context.getTimestamp()); AST2BOpUtility.toVE(getBOpContext(), globals, exists.getValueExpressionNode()); AST2BOpUtility.toVE(getBOpContext(), globals, notExists.getValueExpressionNode()); assertEquals(requiredBound, exists.getRequiredBound(sa)); assertEquals(desiredBound, exists.getDesiredBound(sa)); assertEquals(requiredBound, notExists.getRequiredBound(sa)); assertEquals(desiredBound, notExists.getDesiredBound(sa));
/** * Optimize a single FilterNode. We want to replace a search in search * function node with an In function node. */ protected void optimize(final AST2BOpContext ctx, final StaticAnalysis sa, final JoinGroupNode group, final FilterNode filterNode) { final IValueExpressionNode veNode = filterNode.getValueExpressionNode(); if (veNode instanceof FunctionNode) { final FunctionNode funcNode = (FunctionNode) veNode; if (funcNode.getFunctionURI().equals(BDS.SEARCH_IN_SEARCH)) { filterNode.setArg(0, convert(ctx, funcNode)); } } }
@Override public String toString(final int indent) { final StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append(indent(indent)); sb.append("FILTER( ").append(getValueExpressionNode().toString(indent+1)).append(" )"); // if (getQueryHints() != null) { // sb.append("\n"); // sb.append(indent(indent)); // sb.append(Annotations.QUERY_HINTS); // sb.append("="); // sb.append(getQueryHints().toString()); // } return sb.toString(); }
protected FilterNode filter(final IValueExpressionNode f) { return new FilterNode(f); }
final FilterNode filterNode = new FilterNode( new FunctionNode(// ); AST2BOpUtility.toVE(getBOpContext(), globals, filterNode.getValueExpressionNode()); expectedWhereClause.addChild(filterNode);
new GlobalAnnotations( context.getLexiconNamespace(), context.getTimestamp()); AST2BOpUtility.toVE(getBOpContext(), globals, fn.getValueExpressionNode()); assertEquals(requiredBound, fn.getRequiredBound(sa)); assertEquals(desiredBound, fn.getDesiredBound(sa));
/** * Checks whether the filter node's value expression node is in CNF. */ static public boolean isCNF(final FilterNode filter) { return isCNF(filter.getValueExpressionNode()); }
@Override public IValueExpressionNode getValueExpressionNode() { return (IValueExpressionNode) get(0); }
public void addConstraint(final ValueExpressionNode constraint) { assertValid(); if (log.isInfoEnabled()) log.info("constraint=" + constraint); children.add(new FilterNode(constraint)); }