code: private static List<FieldSchema> getFieldSchemas(HiveRegistrationUnit unit) {
      List<Column> columns = unit.getColumns();
      List<FieldSchema> fieldSchemas = new ArrayList<>();
      if (columns != null && columns.size() > 0) {
        fieldSchemas = getFieldSchemas(columns);
      } else {
        Deserializer deserializer = getDeserializer(unit);
        if (deserializer != null) {
          try {
            fieldSchemas = MetaStoreUtils.getFieldsFromDeserializer(unit.getTableName(), deserializer);
          } catch (SerDeException | MetaException e) {
            LOG.warn("Encountered exception while getting fields from deserializer.", e);
          }
        }
      }
      return fieldSchemas;
    }
docs: First tries getting the {@code FieldSchema}s from the {@code HiveRegistrationUnit}'s columns, if set.
  Else, gets the {@code FieldSchema}s from the deserializer.