private void applyClientProperties(CatalogMeta catalogMeta) {
    Set<TableFormat> formats = CatalogUtil.tableFormats(catalogMeta);
    String catalogType = catalogMeta.getCatalogType();
    if (formats.contains(TableFormat.ICEBERG)) {
      if (CatalogMetaProperties.CATALOG_TYPE_AMS.equalsIgnoreCase(catalogType)) {
        catalogMeta.putToCatalogProperties(
            CatalogMetaProperties.KEY_WAREHOUSE, catalogMeta.getCatalogName());
      } else if (!catalogMeta.getCatalogProperties().containsKey(CatalogProperties.CATALOG_IMPL)) {
        catalogMeta.putToCatalogProperties("type", catalogType);
      }
    } else if (formats.contains(TableFormat.PAIMON) && "hive".equals(catalogType)) {
      catalogMeta.putToCatalogProperties("metastore", catalogType);
    }
  }
Get last execution info

@param terminalId - id of terminal window
@return last session info
amoro-ams/src/main/java/org/apache/amoro/server/terminal/TerminalManager.java