Examples of HiveVarcharWritable


Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

    hv.setValue(val.getHiveVarchar(), getMaxLength());
    return hv;
  }

  private HiveVarcharWritable getWritableWithParams(HiveVarcharWritable val) {
    HiveVarcharWritable newValue = new HiveVarcharWritable();
    newValue.set(val, getMaxLength());
    return newValue;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

  @Override
  public Object copyObject(Object o) {
    if (o == null) {
      return null;
    }
    HiveVarcharWritable writable = (HiveVarcharWritable)o;
    if (doesWritableMatchTypeParams((HiveVarcharWritable)o)) {
      return new HiveVarcharWritable(writable);
    }
    return getWritableWithParams(writable);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

    return getWritableWithParams(writable);
  }

  @Override
  public Object set(Object o, HiveVarchar value) {
    HiveVarcharWritable writable = (HiveVarcharWritable)o;
    writable.set(value, getMaxLength());
    return o;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

    return o;
  }

  @Override
  public Object set(Object o, String value) {
    HiveVarcharWritable writable = (HiveVarcharWritable)o;
    writable.set(value, getMaxLength());
    return o;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

    return o;
  }

  @Override
  public Object create(HiveVarchar value) {
    HiveVarcharWritable ret;
    ret = new HiveVarcharWritable();
    ret.set(value, getMaxLength());
    return ret;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

      // If we disallow varchar in old-style UDFs and only allow GenericUDFs to be defined
      // with varchar arguments, then we might be able to enforce this properly.
      //if (typeParams == null) {
      //  throw new RuntimeException("varchar type used without type params");
      //}
      hc = new HiveVarcharWritable();
    }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

  protected int maxLength = -1;

  public LazyHiveVarchar(LazyHiveVarcharObjectInspector oi) {
    super(oi);
    maxLength = ((VarcharTypeInfo)oi.getTypeInfo()).getLength();
    data = new HiveVarcharWritable();
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

  }

  public LazyHiveVarchar(LazyHiveVarchar copy) {
    super(copy);
    this.maxLength = copy.maxLength;
    data = new HiveVarcharWritable(copy.data);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

        HiveCharWritable t1 = ((HiveCharObjectInspector)poi1).getPrimitiveWritableObject(o1);
        HiveCharWritable t2 = ((HiveCharObjectInspector)poi2).getPrimitiveWritableObject(o2);
        return t1.compareTo(t2);
      }
      case VARCHAR: {
        HiveVarcharWritable t1 = ((HiveVarcharObjectInspector)poi1).getPrimitiveWritableObject(o1);
        HiveVarcharWritable t2 = ((HiveVarcharObjectInspector)poi2).getPrimitiveWritableObject(o2);
        return t1.compareTo(t2);
      }
      case BINARY: {
        BytesWritable bw1 = ((BinaryObjectInspector) poi1).getPrimitiveWritableObject(o1);
        BytesWritable bw2 = ((BinaryObjectInspector) poi2).getPrimitiveWritableObject(o2);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.io.HiveVarcharWritable

    HiveVarchar hv = new HiveVarchar(val, getMaxLength());
    return hv;
  }

  private HiveVarcharWritable getWritableWithParams(HiveVarchar val) {
    HiveVarcharWritable newValue = new HiveVarcharWritable();
    newValue.set(val, getMaxLength());
    return newValue;
  }
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.