@Test public void testLogicalPlan1() throws Exception { LogicalPlan logicalPlan = getLogicalPlan1(); Plan queryPlan = logicalPlan.buildQueryPlan(); HashMap<String, ISink> sinkHashMap = queryPlan.getSinkMap(); Assert.assertEquals(1, sinkHashMap.size()); ISink tupleSink = null; for (HashMap.Entry<String, ISink> entry: sinkHashMap.entrySet()) { tupleSink = entry.getValue(); } Assert.assertTrue(tupleSink instanceof TupleSink); IOperator regexMatcher = ((TupleSink) tupleSink).getInputOperator(); Assert.assertTrue(regexMatcher instanceof RegexMatcher); IOperator keywordSource = ((RegexMatcher) regexMatcher).getInputOperator(); Assert.assertTrue(keywordSource instanceof KeywordMatcherSourceOperator); }
public Plan buildQueryPlan() throws PlanGenException { buildOperators(); validateOperatorGraph(); connectOperators(operatorObjectMap); HashMap<String, ISink> sinkMap = findSinkOperators(operatorObjectMap); return new Plan(sinkMap); }
LogicalPlan { public Plan buildQueryPlan() throws PlanGenException { buildOperators(); validateOperatorGraph(); connectOperators(operatorObjectMap); HashMap<String, ISink> sinkMap = findSinkOperators(operatorObjectMap); return new Plan(sinkMap); } }
LogicalPlan { public Plan buildQueryPlan() throws PlanGenException { buildOperators(); validateOperatorGraph(); connectOperators(operatorObjectMap); HashMap<String, ISink> sinkMap = findSinkOperators(operatorObjectMap); return new Plan(sinkMap); } LogicalPlan(); @JsonCreator  LogicalPlan(
            @JsonProperty(value = PropertyNameConstants.OPERATOR_LIST, required = true)
            List<PredicateBase> predicateList,
            @JsonProperty(value = PropertyNameConstants.OPERATOR_LINK_LIST, required = true)
            List<OperatorLink> operatorLinkList
            ); }
LogicalPlan { public Plan buildQueryPlan() throws PlanGenException { buildOperators(); validateOperatorGraph(); connectOperators(operatorObjectMap); HashMap<String, ISink> sinkMap = findSinkOperators(operatorObjectMap); return new Plan(sinkMap); } LogicalPlan(); @JsonCreator  LogicalPlan(
            @JsonProperty(value = PropertyNameConstants.OPERATOR_LIST, required = true)
            List<PredicateBase> predicateList,
            @JsonProperty(value = PropertyNameConstants.OPERATOR_LINK_LIST, required = true)
            List<OperatorLink> operatorLinkList
            ); @JsonIgnore QueryContext getContext(); @JsonIgnore void setContext(QueryContext context); @JsonProperty(value = PropertyNameConstants.OPERATOR_LIST) List<PredicateBase> getPredicateList(); @JsonProperty(value = PropertyNameConstants.OPERATOR_LINK_LIST) List<OperatorLink> getOperatorLinkList(); Schema getOperatorOutputSchema(String operatorID); Optional<Schema> getOperatorOutputSchema(String operatorID, Map<String, List<Schema>> operatorInputSchemaMap); Map<String, List<Schema>> retrieveAllOperatorInputSchema(); void addOperator(PredicateBase operatorPredicate); void addLink(OperatorLink operatorLink); boolean hasOperator(String operatorID); Plan buildQueryPlan(); @Override boolean equals(Object o); @Override int hashCode(); }
LogicalPlan { public Plan buildQueryPlan() throws PlanGenException { buildOperators(); validateOperatorGraph(); connectOperators(operatorObjectMap); HashMap<String, ISink> sinkMap = findSinkOperators(operatorObjectMap); return new Plan(sinkMap); } LogicalPlan(); @JsonCreator  LogicalPlan(
            @JsonProperty(value = PropertyNameConstants.OPERATOR_LIST, required = true)
            List<PredicateBase> predicateList,
            @JsonProperty(value = PropertyNameConstants.OPERATOR_LINK_LIST, required = true)
            List<OperatorLink> operatorLinkList
            ); @JsonIgnore QueryContext getContext(); @JsonIgnore void setContext(QueryContext context); @JsonProperty(value = PropertyNameConstants.OPERATOR_LIST) List<PredicateBase> getPredicateList(); @JsonProperty(value = PropertyNameConstants.OPERATOR_LINK_LIST) List<OperatorLink> getOperatorLinkList(); Schema getOperatorOutputSchema(String operatorID); Optional<Schema> getOperatorOutputSchema(String operatorID, Map<String, List<Schema>> operatorInputSchemaMap); Map<String, List<Schema>> retrieveAllOperatorInputSchema(); void addOperator(PredicateBase operatorPredicate); void addLink(OperatorLink operatorLink); boolean hasOperator(String operatorID); Plan buildQueryPlan(); @Override boolean equals(Object o); @Override int hashCode();  }