code: public static Constant newInstance(Type type, byte[] val) {
  		switch (type.getSqlType()) {
  		case (INTEGER):
  			return new IntegerConstant(val);
  		case (BIGINT):
  			return new BigIntConstant(val);
  		case (DOUBLE):
  			return new DoubleConstant(val);
  		case (VARCHAR):
  			return new VarcharConstant(val, type);
  		}
  		throw new UnsupportedOperationException("Unspported SQL type: " + type.getSqlType());
  	}
docs: Constructs a new instance of the specified type with value converted from
  the input byte array.
  
  @param type
  the specified type
  @param val
  the byte array contains the value
  @return a constant of specified type with value converted from the byte
  array