private static List<Integer> activeFieldIds(Schema schema, PartitionSpec spec) {
    return spec.fields().stream()
        .filter(field -> schema == null || schema.findField(field.sourceId()) != null)
        .filter(field -> !isVoidTransform(field))
        .map(PartitionField::fieldId)
        .collect(Collectors.toList());
  }
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