private static VectorExpressionWriter genVectorExpressionWritableFloat( SettableFloatObjectInspector fieldObjInspector) throws HiveException { return new VectorExpressionWriterDouble() { private Object obj; public VectorExpressionWriter init(SettableFloatObjectInspector objInspector) throws HiveException { super.init(objInspector); this.obj = initValue(null); return this; } @Override public Object writeValue(double value) throws HiveException { ((SettableFloatObjectInspector) this.objectInspector).set(this.obj, (float) value); return this.obj; } @Override public Object setValue(Object field, double value) throws HiveException { if (null == field) { field = initValue(null); } ((SettableFloatObjectInspector) this.objectInspector).set(field, (float) value); return field; } @Override public Object initValue(Object ignored) { return ((SettableFloatObjectInspector) this.objectInspector) .create(0f); } }.init(fieldObjInspector); }
private static VectorExpressionWriter genVectorExpressionWritableFloat( SettableFloatObjectInspector fieldObjInspector) throws HiveException { return new VectorExpressionWriterDouble() { private Object obj; public VectorExpressionWriter init(SettableFloatObjectInspector objInspector) throws HiveException { super.init(objInspector); this.obj = initValue(null); return this; } @Override public Object writeValue(double value) throws HiveException { ((SettableFloatObjectInspector) this.objectInspector).set(this.obj, (float) value); return this.obj; } @Override public Object setValue(Object field, double value) throws HiveException { if (null == field) { field = initValue(null); } ((SettableFloatObjectInspector) this.objectInspector).set(field, (float) value); return field; } @Override public Object initValue(Object ignored) { return ((SettableFloatObjectInspector) this.objectInspector) .create(0f); } }.init(fieldObjInspector); }
private static VectorExpressionWriter genVectorExpressionWritableFloat( SettableFloatObjectInspector fieldObjInspector) throws HiveException { return new VectorExpressionWriterDouble() { private Object obj; public VectorExpressionWriter init(SettableFloatObjectInspector objInspector) throws HiveException { super.init(objInspector); this.obj = initValue(null); return this; } @Override public Object writeValue(double value) throws HiveException { ((SettableFloatObjectInspector) this.objectInspector).set(this.obj, (float) value); return this.obj; } @Override public Object setValue(Object field, double value) throws HiveException { if (null == field) { field = initValue(null); } ((SettableFloatObjectInspector) this.objectInspector).set(field, (float) value); return field; } @Override public Object initValue(Object ignored) { return ((SettableFloatObjectInspector) this.objectInspector) .create(0f); } }.init(fieldObjInspector); }