public Object set(Object o, HiveChar value) { if (BaseCharUtils.doesPrimitiveMatchTypeParams(value, (CharTypeInfo) typeInfo)) { return value; } else { return new HiveChar(value, getMaxLength()); } }
private boolean doesWritableMatchTypeParams(HiveCharWritable writable) { return BaseCharUtils.doesWritableMatchTypeParams( writable, (CharTypeInfo)typeInfo); }
length = Integer.parseInt(params[0]); if (typeEntry.primitiveCategory == PrimitiveCategory.VARCHAR) { BaseCharUtils.validateVarcharParameter(length); return TypeInfoFactory.getVarcharTypeInfo(length); } else { BaseCharUtils.validateCharParameter(length); return TypeInfoFactory.getCharTypeInfo(length);
public CharTypeInfo(int length) { super(serdeConstants.CHAR_TYPE_NAME, length); BaseCharUtils.validateCharParameter(length); }
public VarcharTypeInfo(int length) { super(serdeConstants.VARCHAR_TYPE_NAME, length); BaseCharUtils.validateVarcharParameter(length); }
public CharTypeInfo(int length) { super(serdeConstants.CHAR_TYPE_NAME, length); BaseCharUtils.validateCharParameter(length); }
public VarcharTypeInfo(int length) { super(serdeConstants.VARCHAR_TYPE_NAME, length); BaseCharUtils.validateVarcharParameter(length); }
@Override public Object set(Object o, HiveVarchar value) { if (BaseCharUtils.doesPrimitiveMatchTypeParams(value, (VarcharTypeInfo) typeInfo)) { return value; } else { // Otherwise value may be too long, convert to appropriate value based on params return new HiveVarchar(value, getMaxLength()); } }
length = Integer.parseInt(params[0]); if (typeEntry.primitiveCategory == PrimitiveCategory.VARCHAR) { BaseCharUtils.validateVarcharParameter(length); return TypeInfoFactory.getVarcharTypeInfo(length); } else { BaseCharUtils.validateCharParameter(length); return TypeInfoFactory.getCharTypeInfo(length);
private boolean doesWritableMatchTypeParams(HiveVarcharWritable writable) { return BaseCharUtils.doesWritableMatchTypeParams( writable, (VarcharTypeInfo)typeInfo); }
public CharTypeInfo(int length) { super(serdeConstants.CHAR_TYPE_NAME, length); BaseCharUtils.validateCharParameter(length); }
public VarcharTypeInfo(int length) { super(serdeConstants.VARCHAR_TYPE_NAME, length); BaseCharUtils.validateVarcharParameter(length); }
public HiveChar getPrimitiveJavaObject(Object o) { if (o == null) { return null; } HiveChar value; if (o instanceof String) { value = new HiveChar((String) o, getMaxLength()); } else { value = (HiveChar) o; } if (BaseCharUtils.doesPrimitiveMatchTypeParams(value, (CharTypeInfo) typeInfo)) { return value; } // value needs to be converted to match type params return getPrimitiveWithParams(value); }
length = Integer.valueOf(params[0]); if (typeEntry.primitiveCategory == PrimitiveCategory.VARCHAR) { BaseCharUtils.validateVarcharParameter(length); return TypeInfoFactory.getVarcharTypeInfo(length); } else { BaseCharUtils.validateCharParameter(length); return TypeInfoFactory.getCharTypeInfo(length);
private boolean doesWritableMatchTypeParams(HiveVarcharWritable writable) { return BaseCharUtils.doesWritableMatchTypeParams( writable, (VarcharTypeInfo)typeInfo); }
public CharTypeInfo(int length) { super(serdeConstants.CHAR_TYPE_NAME, length); BaseCharUtils.validateCharParameter(length); }
public VarcharTypeInfo(int length) { super(serdeConstants.VARCHAR_TYPE_NAME, length); BaseCharUtils.validateVarcharParameter(length); }
@Override public HiveVarchar getPrimitiveJavaObject(Object o) { if (o == null) { return null; } HiveVarchar value; if (o instanceof String) { value= new HiveVarchar((String)o, getMaxLength()); } else { value = (HiveVarchar)o; } if (BaseCharUtils.doesPrimitiveMatchTypeParams(value, (VarcharTypeInfo) typeInfo)) { return value; } // value needs to be converted to match the type params (length, etc). return getPrimitiveWithParams(value); }
length = Integer.valueOf(params[0]); if (typeEntry.primitiveCategory == PrimitiveCategory.VARCHAR) { BaseCharUtils.validateVarcharParameter(length); return TypeInfoFactory.getVarcharTypeInfo(length); } else { BaseCharUtils.validateCharParameter(length); return TypeInfoFactory.getCharTypeInfo(length);
private boolean doesWritableMatchTypeParams(HiveVarcharWritable writable) { return BaseCharUtils.doesWritableMatchTypeParams( writable, (VarcharTypeInfo)typeInfo); }