for(var i = 0; i < fields.length; ++i) {
      columns.push(fields[i].name);
    }