private Matcher getMatcher() {
    String columnPattern = desc.getPattern();
    if (columnPattern == null) {
      columnPattern = "*";
    }
    columnPattern = columnPattern.toLowerCase();
    columnPattern = columnPattern.replaceAll("\\*", ".*");

    Pattern pattern = Pattern.compile(columnPattern);
    return pattern.matcher("");
  }
Operation process of showing the columns.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/show/ShowColumnsOperation.java