Package com.odiago.flumebase.plan

Examples of com.odiago.flumebase.plan.FilterNode


        allRequiredFields, groupByPropagateFields, exprPropagateFields,
        projectionInputs, projectionOutputs, consoleFields);

    if (where != null) {
      // Non-null filter conditions; apply the filter to all of our sources.
      PlanNode filterNode = new FilterNode(where);
      flowSpec.attachToLastLayer(filterNode);
    }

    // Add an aggregation layer, if required.
    addAggregationToPlan(srcOutSymbolTable, flowSpec, groupByPropagateFields);

    // Evaluate calculated-expression fields.
    addExpressionsToPlan(flowSpec, exprPropagateFields, projectionInputs);

    // Create the projected schema based on the symbol table returned by our source.
    Schema projectedSchema = createFieldSchema(distinctFields(projectionOutputs));
    ProjectionNode projectionNode = new ProjectionNode(projectionInputs, projectionOutputs);
    projectionNode.setAttr(PlanNode.OUTPUT_SCHEMA_ATTR, projectedSchema);
    flowSpec.attachToLastLayer(projectionNode);

    if (mHaving != null) {
      // Non-null HAVING conditions; apply another filter to our output.
      PlanNode havingNode = new FilterNode(mHaving);
      flowSpec.attachToLastLayer(havingNode);
    }

    return createReturnedContext(planContext, consoleFields);
  }
View Full Code Here


      default:
        throw new DAGOperatorException("Unhandled stream source type: "
            + streamSymbol.getSourceType());
      }
    } else if (node instanceof FilterNode) {
      FilterNode filterNode = (FilterNode) node;
      Expr filterExpr = filterNode.getFilterExpr();
      newElem = new FilterElement(newContext, filterExpr);
    } else if (node instanceof ProjectionNode) {
      ProjectionNode projNode = (ProjectionNode) node;
      Schema outSchema = (Schema) projNode.getAttr(PlanNode.OUTPUT_SCHEMA_ATTR);
      newElem = new ProjectionElement(newContext, outSchema, projNode.getInputFields(),
View Full Code Here

TOP

Related Classes of com.odiago.flumebase.plan.FilterNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.