@Override public HiveChar getPrimitiveJavaObject(Object o) { // check input object's length, if it doesn't match // then output a new primitive with the correct params. if (o == null) { return null; } if ((o instanceof Text) || (o instanceof TimestampWritableV2) || (o instanceof HiveDecimalWritable) || (o instanceof DoubleWritable) || (o instanceof FloatWritable) || (o instanceof LongWritable) || (o instanceof IntWritable) || (o instanceof BooleanWritable)) { String str = o.toString(); return new HiveChar(str, ((CharTypeInfo)typeInfo).getLength()); } HiveCharWritable writable = ((HiveCharWritable) o); if (doesWritableMatchTypeParams(writable)) { return writable.getHiveChar(); } return getPrimitiveWithParams(writable); }
@Override public HiveChar getPrimitiveJavaObject(Object o) { // check input object's length, if it doesn't match // then output a new primitive with the correct params. if (o == null) { return null; } if (o instanceof Text) { String str = ((Text)o).toString(); return new HiveChar(str, ((CharTypeInfo)typeInfo).getLength()); } HiveCharWritable writable = ((HiveCharWritable) o); if (doesWritableMatchTypeParams(writable)) { return writable.getHiveChar(); } return getPrimitiveWithParams(writable); }
@Override public HiveChar getPrimitiveJavaObject(Object o) { // check input object's length, if it doesn't match // then output a new primitive with the correct params. if (o == null) { return null; } if (o instanceof Text) { String str = ((Text)o).toString(); return new HiveChar(str, ((CharTypeInfo)typeInfo).getLength()); } HiveCharWritable writable = ((HiveCharWritable) o); if (doesWritableMatchTypeParams(writable)) { return writable.getHiveChar(); } return getPrimitiveWithParams(writable); }
@Override public HiveChar getPrimitiveJavaObject(Object o) { // check input object's length, if it doesn't match // then output a new primitive with the correct params. if (o == null) { return null; } if (o instanceof Text) { String str = ((Text)o).toString(); return new HiveChar(str, ((CharTypeInfo)typeInfo).getLength()); } HiveCharWritable writable = ((HiveCharWritable) o); if (doesWritableMatchTypeParams(writable)) { return writable.getHiveChar(); } return getPrimitiveWithParams(writable); }
@Override public HiveChar getPrimitiveJavaObject(Object o) { // check input object's length, if it doesn't match // then output a new primitive with the correct params. if (o == null) { return null; } if ((o instanceof Text) || (o instanceof TimestampWritableV2) || (o instanceof HiveDecimalWritable) || (o instanceof DoubleWritable) || (o instanceof FloatWritable) || (o instanceof LongWritable) || (o instanceof IntWritable) || (o instanceof BooleanWritable)) { String str = o.toString(); return new HiveChar(str, ((CharTypeInfo)typeInfo).getLength()); } HiveCharWritable writable = ((HiveCharWritable) o); if (doesWritableMatchTypeParams(writable)) { return writable.getHiveChar(); } return getPrimitiveWithParams(writable); }