static Map<Object, Object> getPropertiesForExplain(Properties properties) {
    if (properties != null) {
      Map<Object, Object> clone = null;
      String value = properties.getProperty(LIST_COLUMN_COMMENTS);
      if (value != null) {
        // should copy properties first
        clone = new HashMap<>(properties);
        clone.put(LIST_COLUMN_COMMENTS, quoteComments(value));
      }
      value = properties.getProperty(StatsSetupConst.NUM_ERASURE_CODED_FILES);
      if ("0".equals(value)) {
        // should copy properties first
        if (clone == null) {
          clone = new HashMap<>(properties);
        }
        clone.remove(StatsSetupConst.NUM_ERASURE_CODED_FILES);
      }
      for (String key : FILTER_OUT_FROM_EXPLAIN) {
        if (properties.containsKey(key)) {
          if (clone == null) {
            clone = new HashMap<>(properties);
          }
          clone.remove(key);
        }
      }
      if (clone != null) {
        return clone;
      }
    }
    return properties;
  }
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