Package com.odiago.flumebase.exec

Examples of com.odiago.flumebase.exec.SymbolTable.resolve()


    // Create an Avro output schema for this node, specifying all the fields
    // we can emit.  Use our internal symbol (mSymbols a.k.a. outTable) to
    // create more precise TypedFields that use the proper avro names.
    List<TypedField> outFields = new ArrayList<TypedField>();
    for (String fieldName : fieldNames) {
      AssignedSymbol sym = (AssignedSymbol) outTable.resolve(fieldName).resolveAliases();
      outFields.add(new TypedField(fieldName, sym.getType(), sym.getAssignedName(), fieldName));
    }

    PlanNode node = new NamedSourceNode(mSourceName, outFields);
    planContext.getFlowSpec().addRoot(node);
View Full Code Here


    assert e1Ident != null;
    assert e2Ident != null;

    SymbolTable symTab = src.getFieldSymbols();

    Symbol e1Sym = symTab.resolve(e1Ident);
    Symbol e2Sym = symTab.resolve(e2Ident);

    assert e1Sym != null;
    assert e2Sym != null;
View Full Code Here

    assert e2Ident != null;

    SymbolTable symTab = src.getFieldSymbols();

    Symbol e1Sym = symTab.resolve(e1Ident);
    Symbol e2Sym = symTab.resolve(e2Ident);

    assert e1Sym != null;
    assert e2Sym != null;

    e1Sym = e1Sym.resolveAliases();
View Full Code Here

  @Override
  protected void visit(DropStmt s) throws VisitException {
    // Check that the DROP ____ type matches the type of the object to be dropped.
    SymbolTable symtab = mSymTableContext.top();
    String name = s.getName();
    Symbol sym = symtab.resolve(name);
    if (null == sym) {
      throw new TypeCheckException("No such object at top level: " + name);
    }
    EntityTarget targetType = s.getType();
    Type.TypeName symType = sym.getType().getTypeName();
View Full Code Here

  protected void visit(LiteralSource s) throws VisitException {
    SymbolTable symtab = mSymTableContext.top();

    String name = s.getName();
    LOG.debug("Visiting literalsrc " + name);
    Symbol symbol = symtab.resolve(name);
    if (null == symbol) {
      throw new TypeCheckException("No such identifier: " + name);
    } else if (symbol.getType().getTypeName() != Type.TypeName.STREAM) {
      throw new TypeCheckException("Identifier " + name + " is not a stream (type="
          + symbol.getType());
View Full Code Here

  protected void visit(DescribeStmt s) throws VisitException {
    // Check the symbol table that the identifier exists.
    String id = s.getIdentifier();
    SymbolTable symtab = mSymTableContext.top();

    Symbol symbol = symtab.resolve(id);
    if (null == symbol) {
      throw new TypeCheckException("No such identifier: " + id);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.