public static CharDatum createChar(String val) { return new CharDatum(val); }
public static CharDatum createChar(byte[] bytes) { return new CharDatum(bytes); }
public static CharDatum createChar(char val) { return new CharDatum(val); }
public static CharDatum createChar(byte val) { return new CharDatum(val); }
public static CharDatum createChar(char val) { return new CharDatum(val); }
public static CharDatum createChar(byte[] bytes) { return new CharDatum(bytes); }
public static CharDatum createChar(String val) { return new CharDatum(val); }
public static CharDatum createChar(byte val) { return new CharDatum(val); }
public static Datum convertWritable2Datum(Writable value) throws UnsupportedDataTypeException { if (value == null) { return NullDatum.get(); } DataType type = convertWritableToTajoType(value.getClass()); switch(type.getType()) { case INT1: return new Int2Datum(((ByteWritable)value).get()); case INT2: return new Int2Datum(((ShortWritable)value).get()); case INT4: return new Int4Datum(((IntWritable)value).get()); case INT8: return new Int8Datum(((LongWritable)value).get()); case FLOAT4: return new Float4Datum(((FloatWritable)value).get()); case FLOAT8: return new Float8Datum(((DoubleWritable)value).get()); case DATE: return new DateDatum(((DateWritable)value).getDays() + DateTimeConstants.UNIX_EPOCH_JDATE); case TIMESTAMP: return new TimestampDatum(DateTimeUtil.javaTimeToJulianTime( ((TimestampWritable)value).getTimestamp().getTime())); case CHAR: return new CharDatum(value.toString()); case TEXT: return new TextDatum(value.toString()); case VARBINARY: return new BlobDatum(((BytesWritable)value).getBytes()); } throw new TajoRuntimeException(new UnsupportedDataTypeException(value.getClass().getTypeName())); } }