Package com.facebook.presto.hive.shaded.org.apache.thrift.protocol

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


  }

  @Override
  public TMap readMapBegin() throws TException {
    assert (!inner);
    TMap map = new TMap();
    if (columns[index] == null || columns[index].equals(nullString)) {
      index++;
      if (returnNulls) {
        return null;
      }
    } else if (columns[index].isEmpty()) {
      index++;
    } else {
      fields = mapPattern.split(columns[index++]);
      map = new TMap(ORDERED_TYPE, ORDERED_TYPE, fields.length / 2);
    }
    innerIndex = 0;
    inner = true;
    isMap = true;
    return map;
View Full Code Here


      deserializeReuse = (HashMap<Object, Object>) reuse;
      deserializeReuse.clear();
    } else {
      deserializeReuse = new HashMap<Object, Object>();
    }
    TMap themap = iprot.readMapBegin();
    if (themap == null) {
      return null;
    }
    // themap might be reused by the Protocol.
    int mapSize = themap.size;
View Full Code Here

    MapObjectInspector moi = (MapObjectInspector) oi;
    ObjectInspector koi = moi.getMapKeyObjectInspector();
    ObjectInspector voi = moi.getMapValueObjectInspector();

    Map<?, ?> map = moi.getMap(o);
    serializeMap = new TMap(keyType.getType(), valueType.getType(), map.size());
    oprot.writeMapBegin(serializeMap);

    for (Object element : map.entrySet()) {
      Map.Entry it = (Map.Entry) element;
      Object key = it.getKey();
View Full Code Here

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

TOP

Related Classes of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap

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.