private AbstractSerDe initializeSerde(Configuration conf, Properties props) throws SerDeException {
    String serdeName = HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_FETCH_OUTPUT_SERDE);
    Class<? extends AbstractSerDe> serdeClass;
    try {
      serdeClass =
          Class.forName(serdeName, true, JavaUtils.getClassLoader()).asSubclass(AbstractSerDe.class);
    } catch (ClassNotFoundException e) {
      throw new SerDeException(e);
    }
    // cast only needed for Hadoop 0.17 compatibility
    AbstractSerDe serde = ReflectionUtil.newInstance(serdeClass, null);
    Properties serdeProps = new Properties();
    if (serde instanceof DelimitedJSONSerDe) {
      serdeProps.put(SERIALIZATION_FORMAT, props.getProperty(SERIALIZATION_FORMAT));
      serdeProps.put(SERIALIZATION_NULL_FORMAT, props.getProperty(SERIALIZATION_NULL_FORMAT));
    }
    serde.initialize(conf, serdeProps, null);
    return serde;
  }
serialize row by user specified serde and call toString() to make string type result
serde/src/java/org/apache/hadoop/hive/serde2/DefaultFetchFormatter.java