Examples of PrimitiveCategory


Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

          startRow = new byte[serializeStream.getCount()];
          System.arraycopy(serializeStream.getData(), 0, startRow, 0, serializeStream.getCount());
          return startRow;
        }

        PrimitiveCategory pc = poi.getPrimitiveCategory();
        switch (poi.getPrimitiveCategory()) {
        case INT:
            return Bytes.toBytes(((IntWritable)writable).get());
        case BOOLEAN:
            return Bytes.toBytes(((BooleanWritable)writable).get());
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

    return value;
  }

  @Override
  public ConstantObjectInspector getWritableObjectInspector() {
    PrimitiveCategory pc = ((PrimitiveTypeInfo)getTypeInfo())
        .getPrimitiveCategory();
    // Convert from Java to Writable
    Object writableValue = PrimitiveObjectInspectorFactory
        .getPrimitiveJavaObjectInspector(pc).getPrimitiveWritableObject(
          getValue());
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

    new DataType<Text>(Text.class) {};
   
   
  public static DataType<?> getDataType(PrimitiveObjectInspector pOI)
  {
    PrimitiveCategory pC = pOI.getPrimitiveCategory();
    switch(pC)
    {
    case BOOLEAN: return BOOLEAN;
    case BYTE : return BYTE;
    case SHORT: return SHORT;
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

      throw new WindowingException(
          "Value Boundary expression must be of primitve type");
    }

    PrimitiveObjectInspector pOI = (PrimitiveObjectInspector) OI;
    PrimitiveCategory pC = pOI.getPrimitiveCategory();

    switch (pC)
    {
    case BYTE:
    case DOUBLE:
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

   * Create a lazy primitive class given the type name.
   */
  public static LazyPrimitive<? extends ObjectInspector, ? extends Writable>
  createLazyPrimitiveClass(PrimitiveObjectInspector oi) {

    PrimitiveCategory p = oi.getPrimitiveCategory();

    switch (p) {
    case BOOLEAN:
      return new LazyBoolean((LazyBooleanObjectInspector) oi);
    case BYTE:
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

  }

  public static LazyPrimitive<? extends ObjectInspector, ? extends Writable>
  createLazyPrimitiveBinaryClass(PrimitiveObjectInspector poi) {

    PrimitiveCategory pc = poi.getPrimitiveCategory();

    switch (pc) {
    case BOOLEAN:
      return new LazyDioBoolean((LazyBooleanObjectInspector) poi);
    case BYTE:
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

  /**
   * Create a lazy binary primitive class given the type name.
   */
  public static LazyBinaryPrimitive<?, ?> createLazyBinaryPrimitiveClass(
      PrimitiveObjectInspector oi) {
    PrimitiveCategory p = oi.getPrimitiveCategory();
    switch (p) {
    case BOOLEAN:
      return new LazyBinaryBoolean((WritableBooleanObjectInspector) oi);
    case BYTE:
      return new LazyBinaryByte((WritableByteObjectInspector) oi);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

        LAZY_BINARY_OBJECT_INSPECTOR);
  }

  public static AbstractPrimitiveLazyObjectInspector<?> getLazyObjectInspector(
      PrimitiveTypeInfo typeInfo, boolean escaped, byte escapeChar) {
    PrimitiveCategory primitiveCategory = typeInfo.getPrimitiveCategory();

    switch(primitiveCategory) {
    case STRING:
      return getLazyStringObjectInspector(escaped, escapeChar);
    default:
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

          "The function CAST as DATE requires at least one argument, got "
          + arguments.length);
    }
    try {
      argumentOI = (PrimitiveObjectInspector) arguments[0];
      PrimitiveCategory pc = argumentOI.getPrimitiveCategory();
      PrimitiveGrouping pg =
          PrimitiveObjectInspectorUtils.getPrimitiveGrouping(pc);
      switch (pg) {
        case DATE_GROUP:
        case STRING_GROUP:
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory

          "UPPER only takes primitive types, got " + argumentOI.getTypeName());
    }
    argumentOI = (PrimitiveObjectInspector) arguments[0];

    stringConverter = new PrimitiveObjectInspectorConverter.StringConverter(argumentOI);
    PrimitiveCategory inputType = argumentOI.getPrimitiveCategory();
    ObjectInspector outputOI = null;
    BaseCharTypeInfo typeInfo;
    switch (inputType) {
      case CHAR:
        // return type should have same length as the input.
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.