static Table getTable(Configuration configuration, Properties properties, boolean skipCache) {
    String metaTable = properties.getProperty(IcebergAcidUtil.META_TABLE_PROPERTY);

    Properties props = new Properties(properties); // use input properties as default
    if (metaTable != null) {
      // HiveCatalog, HadoopCatalog uses NAME to identify the metadata table
      props.put(Catalogs.NAME, properties.get(Catalogs.NAME) + "." + metaTable);
      // HadoopTable uses LOCATION to identify the metadata table
      props.put(Catalogs.LOCATION, properties.get(Catalogs.LOCATION) + "#" + metaTable);
    }
    String tableIdentifier = props.getProperty(Catalogs.NAME);
    Function<Void, Table> tableLoadFunc =
        unused -> {
          Table tab = Catalogs.loadTable(configuration, props);
          SessionStateUtil.addResource(configuration, tableIdentifier, tab);
          return tab;
        };

    if (skipCache) {
      return tableLoadFunc.apply(null);
    } else {
      return SessionStateUtil.getResource(configuration, tableIdentifier).filter(o -> o instanceof Table)
          .map(o -> (Table) o).orElseGet(() -> {
            LOG.debug("Iceberg table {} is not found in QueryState. Loading table from configured catalog",
                tableIdentifier);
            return tableLoadFunc.apply(null);
          });
    }
  }
Load the iceberg table either from the {@link QueryState} or through the configured catalog. Look for the table
object stored in the query state. If it's null, it means the table was not loaded yet within the same query
therefore we claim it through the Catalogs API and then store it in query state.
@param configuration a Hadoop configuration
@param properties controlling properties
@param skipCache if set to true there won't be an attempt to retrieve the table from SessionState
@return an Iceberg table
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java