public static Map<String, String> getPropertiesForExplain(Map<String, String> properties, String... propertiesToRemove) {
    if (properties == null) {
      return Collections.emptyMap();
    }

    Map<String, String> clone = new HashMap<>(properties);
    for (String key : propertiesToRemove) {
      clone.remove(key);
    }

    return clone;
  }
Get a Map of table or partition properties to be used in explain extended output.
Do some filtering to make output readable and/or concise.
ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java