Examples of SettableIntObjectInspector


Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableIntObjectInspector

        return doubleOi.create((Double) fromPoi.getPrimitiveJavaObject(from));
      case BOOLEAN:
        SettableBooleanObjectInspector boolOi = (SettableBooleanObjectInspector) toOi;
        return boolOi.create((Boolean) fromPoi.getPrimitiveJavaObject(from));
      case INT:
        SettableIntObjectInspector intOi = (SettableIntObjectInspector) toOi;
        return intOi.create((Integer) fromPoi.getPrimitiveJavaObject(from));
      case LONG:
        SettableLongObjectInspector longOi = (SettableLongObjectInspector) toOi;
        return longOi.create((Long) fromPoi.getPrimitiveJavaObject(from));
      case STRING:
        SettableStringObjectInspector strOi = (SettableStringObjectInspector) toOi;
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableIntObjectInspector

   
    assertTrue(trSF.getFieldObjectInspector().getCategory() == Category.PRIMITIVE);
    PrimitiveObjectInspector poi = (PrimitiveObjectInspector) trSF.getFieldObjectInspector();
    assertTrue(poi.getPrimitiveCategory() == PrimitiveObjectInspector.PrimitiveCategory.INT);
   
    SettableIntObjectInspector sioi = (SettableIntObjectInspector) poi;
    int value = sioi.get(totalResults);
   
   
    assertEquals(1, value);
   
  }
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.