private static Set<Integer> commonActiveFieldIds(Schema schema, Collection<PartitionSpec> specs) {
    Set<Integer> commonActiveFieldIds = Sets.newHashSet();

    int specIndex = 0;
    for (PartitionSpec spec : specs) {
      if (specIndex == 0) {
        commonActiveFieldIds.addAll(activeFieldIds(schema, spec));
      } else {
        commonActiveFieldIds.retainAll(activeFieldIds(schema, spec));
      }

      specIndex++;
    }

    return commonActiveFieldIds;
  }
Checks if any of the specs in a table is partitioned.

@param table the table to check.
@return {@code true} if the table is partitioned, {@code false} otherwise.
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/Partitioning.java