private MCreationMetadata convertToMCreationMetadata(CreationMetadata m) {
    if (m == null) {
      return null;
    }
    assert !m.isSetMaterializationTime();
    Set<MMVSource> tablesUsed = new HashSet<>();
    if (m.isSetSourceTables()) {
      for (SourceTable sourceTable : m.getSourceTables()) {
        tablesUsed.add(convertToSourceTable(m.getCatName(), sourceTable));
      }
    } else {
      for (String fullyQualifiedName : m.getTablesUsed()) {
        tablesUsed.add(convertToSourceTable(m.getCatName(), fullyQualifiedName));
      }
    }
    return new MCreationMetadata(normalizeIdentifier(m.getCatName()),
            normalizeIdentifier(m.getDbName()), normalizeIdentifier(m.getTblName()),
            tablesUsed, m.getValidTxnList(), System.currentTimeMillis());
  }
Converts a storage descriptor to a db-backed storage descriptor.  It points the
storage descriptor's column descriptor to the one passed as an argument,
so it does not create a new mcolumn descriptor object.
@param sd the storage descriptor to wrap in a db-backed object
@param mcd the db-backed column descriptor
@return the db-backed storage descriptor object
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java