Examples of TList


Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList

  }

  @Override
  public TList readListBegin() throws TException {
    assert (!inner);
    TList list = new TList();
    if (columns[index] == null || columns[index].equals(nullString)) {
      index++;
      if (returnNulls) {
        return null;
      }
    } else if (columns[index].isEmpty()) {
      index++;
    } else {
      fields = secondaryPattern.split(columns[index++]);
      list = new TList(ORDERED_TYPE, fields.length);
    }
    innerIndex = 0;
    inner = true;
    return list;
  }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList

  }

  @Override
  public ArrayList<Object> deserialize(Object reuse, TProtocol iprot)
      throws SerDeException, TException, IllegalAccessException {
    TList thelist = iprot.readListBegin();
    if (thelist == null) {
      return null;
    }

    ArrayList<Object> deserializeReuse;
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList

    WriteNullsProtocol nullProtocol =
        (oprot instanceof WriteNullsProtocol) ? (WriteNullsProtocol) oprot : null;

    if (o instanceof List) {
      List<?> list = (List<?>) o;
      oprot.writeListBegin(new TList(mt.getType(), list.size()));
      for (Object element : list) {
        if (element == null) {
          assert (nullProtocol != null);
          nullProtocol.writeNull();
        } else {
          mt.serialize(element, elementObjectInspector, oprot);
        }
      }
    } else {
      Object[] list = (Object[]) o;
      oprot.writeListBegin(new TList(mt.getType(), list.length));
      for (Object element : list) {
        if (element == null && nullProtocol != null) {
          assert (nullProtocol != null);
          nullProtocol.writeNull();
        } else {
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList

   * calling this method again.
   */
  @Override
  public TList readListBegin() throws TException {
    stackLevel++;
    tlist = new TList(ORDERED_TYPE, readI32());
    if (tlist.size == 0 && lastPrimitiveWasNull()) {
      return null;
    }
    return tlist;
  }
View Full Code Here

Examples of frege.prelude.PreludeBase.TList

 
  public class FregeModelVisitor /* extends AbstractVisitor */ {   
   
    public boolean visit(TGlobal g, TTree env, boolean top) {
      final TList syms = Utilities.symbols(env).<TList>forced();
      // do one category after the other according to the predefined order
      for (int cat : order) {
        if (!top) { // avoid unneeded list traversals
          if (cat != func && cat != dcon) continue;
        }
        else if (cat == dcon) continue;
       
        // go through the list of symbols and do the ones that equal the current category
        TList.DCons elem = syms._Cons();
        boolean found = false;
        while (elem != null) {
          final TSymbolT sym = Delayed.<TSymbolT>forced( elem.mem1 );
          elem = (elem.mem2.<TList>forced())._Cons();
          if (sym._constructor() != cat) continue;
View Full Code Here

Examples of frege.prelude.PreludeBase.TList

      return true;
    }
   
    public boolean visit(TGlobal g, TExprT expr) {
      // System.err.println("visiting: " + g.toString() + ", " + expr.toString());
      TList symbols = (TList) FregeParseController.funSTG(
          Utilities.exprSymbols(expr), g);
      TList.DCons node = symbols._Cons();
      while (node != null) {
        TSymbolT sym = Delayed.<TSymbolT>forced( node.mem1);
        visit(g, sym);
        node = (node.mem2.<TList>forced())._Cons();
      }
View Full Code Here

Examples of frege.prelude.PreludeBase.TList

      final TSubSt sub = TGlobal.sub(g);
      final String pack = TSubSt.thisPack(sub);
     
      pushSubItem(new PackageItem(pack, TSubSt.thisPos(sub)));
      if  (! "".equals(pack)) {
        final TList pnps =  Utilities.imports(g).<TList>forced();
        DCons elem = pnps._Cons();
        while (elem != null) {
          final TTuple3 tuple = Delayed.<TTuple3>forced( elem.mem1 );
          elem = (elem.mem2.<TList>forced())._Cons();
          final TPosition pos = Delayed.<TPosition>forced(tuple.mem1);
          final String ns     = Delayed.<String>forced(tuple.mem2);
View Full Code Here

Examples of frege.prelude.PreludeBase.TList

            + ", tokenID=" + idprev + id
            + ", value=\"" + val + '"'
            + ", direct=" + direct
            + ", inside=" + inside);
       
      TList ps = null;
      boolean first = true;
      /*
      if (token != null && (TToken.tokid(token) == TTokenID.IMPORT
          || TToken.tokid(tprev) == TTokenID.IMPORT)) {
        pref = token != null && TToken.tokid(token) != TTokenID.IMPORT
              ? TToken.value(token)
              : "";
           
        List<String> packs = parser.getFD().getAllSources(pref);
        for (String p: packs) {
          result.add(new SourceProposal(p, pref, offset));
        }
        first = result.size() == 0;
      }
      else */ {
        ps = Utilities.proposeContent(g, parser.ourRoot(), offset, tokens, inx);
        while (true) {
          final TList.DCons node = ps._Cons();
          if (node == null) break;
          TProposal p = Delayed.<TProposal>forced(node.mem1);
          if (first) {
            first = false;
            pref = TProposal.prefix(p);
View Full Code Here

Examples of frege.prelude.PreludeBase.TList

      final String[] srcs = fd.getSp().split(System.getProperty("path.separator"));
      final String contents = BuilderUtils.getFileContents(file);
     
      getPlugin().writeInfoMsg(
          "Collecting dependencies from frege file: " + fromPath);
      TList packs = frege.compiler.Scanner.dependencies(contents).<TList>forced();
      packs = Utilities.correctDependenciesFor(packs, fromPath);
     
      while (true) {
        final DCons cons = packs._Cons();
        if (cons == null) break;
        packs = cons.mem2.<TList>forced();
        final String pack = Delayed.<String>forced(cons.mem1);
        final IFile known = fPackages.get(pack);
        if (known != null) {
View Full Code Here

Examples of frege.prelude.PreludeBase.TList

        final String target = Main.targetPath(result, ".java");
       
        getPlugin().writeInfoMsg("built: " + target);
        // get the frege path and build path
        final String bp = TOptions.dir( TGlobal.options(result) );
        final TList ourPath = frege.compiler.Utilities.ourPath(TGlobal.options(result));
        final String fp = Delayed.<String>forced(
            PreludeText.joined(
                              System.getProperty("path.separator"),
                              ourPath
                ));
        final TList srcPath = TOptions.sourcePath(TGlobal.options(result));
        final String sp = Delayed.<String>forced(
            PreludeText.joined(
                          System.getProperty("path.separator"),
                          srcPath
            ));
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.