public TsTable getUsingTableSchema(final PartialPath database, final String tableName)
      throws MetadataException {
    final ConfigTableNode node = getTableNode(database, tableName);
    if (node.getPreDeletedColumns().isEmpty()) {
      return node.getTable();
    }
    final TsTable newTable = TsTable.deserialize(ByteBuffer.wrap(node.getTable().serialize()));
    node.getPreDeletedColumns().forEach(newTable::removeColumnSchema);
    return newTable;
  }
This method returns the templateId set on paths if the path set matches or is a prefix of input
path pattern.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java