public static boolean arePrefixColumns(List<FieldSchema> p, List<FieldSchema> s) {
    if (p == s) {
      return true;
    }
    if (p == null || s == null || p.size() > s.size()) {
      return false;
    }
    return areSameColumns(p, s.subList(0, p.size()));
  }
Returns true if p is a prefix of s.
<p>
The compare of {@link FieldSchema} is the same as {@link #areSameColumns(List, List)}.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java