private List<FieldSchema> getCols() throws HiveException {
    Table table = context.getDb().getTable(desc.getTableName());
    List<FieldSchema> allColumns = new ArrayList<>();
    allColumns.addAll(table.getCols());
    allColumns.addAll(table.getPartCols());
    return allColumns;
  }
Operation process of showing the columns.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/show/ShowColumnsOperation.java