private List<FieldSchema> getColsInternal(boolean forMs) {

    try {
      String serializationLib = tPartition.getSd().getSerdeInfo().getSerializationLib();
      // Do the lightweight check for general case.
      if (Table.hasMetastoreBasedSchema(SessionState.getSessionConf(), serializationLib)) {
        return tPartition.getSd().getCols();
      } else if (forMs && !Table.shouldStoreFieldsInMetastore(
          SessionState.getSessionConf(), serializationLib, table.getParameters())) {
        return Hive.getFieldsFromDeserializerForMsStorage(table, getDeserializer(), SessionState.getSessionConf());
      }
      return HiveMetaStoreUtils.getFieldsFromDeserializer(table.getTableName(), getDeserializer(),
          SessionState.getSessionConf());
    } catch (Exception e) {
      LOG.error("Unable to get cols from serde: " +
          tPartition.getSd().getSerdeInfo().getSerializationLib(), e);
    }

    return Collections.emptyList();
  }
Should be only used by serialization.
ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java