JingsongLi commented on code in PR #9540:
URL: https://github.com/apache/paimon/pull/9540#discussion_r3921081034
##########
paimon-core/src/main/java/org/apache/paimon/catalog/Catalog.java:
##########
@@ -1072,35 +1072,23 @@ default void createPartitions(Identifier identifier,
List<Map<String, String>> p
throws TableNotExistException {}
/**
- * Create partitions of the specify table, with explicit existence
semantics and optionally
- * reporting statistics for them in the same call.
- *
- * <p>The statistics are matched to {@code partitions} by {@link
PartitionStatistics#spec()}, so
- * they may cover only some of them, and {@code replaceStatistics} says
whether they replace
- * what the catalog already holds or add to it. What decides whether they
survive is whether a
- * catalog overrides this method: one that does not registers the
partitions exactly as {@link
- * #createPartitions(Identifier, List)} does and drops the report, however
much of it the
- * catalog could have stored, and for a catalog that keeps no partitions
at all that means it
- * does nothing.
- *
- * @param identifier path of the table to create partitions
- * @param partitions partitions to be created
- * @param ignoreIfExists if false, fail when any partition already exists
and apply none of the
- * batch; if true, behave like {@link #createPartitions(Identifier,
List)}
- * @param statistics statistics to report, or null to report none
- * @param replaceStatistics whether the report replaces the stored values
rather than adding to
- * them; ignored when {@code statistics} is null
- * @throws TableNotExistException if the table does not exist
- * @throws UnsupportedOperationException if {@code ignoreIfExists} is
false and the catalog does
- * not implement strict creation, which is what the default here does
+ * Create partitions atomically unless existing entries are ignored, with
optional statistics
+ * and position-aligned locations whose null entries use defaults.
*/
default void createPartitions(
Identifier identifier,
List<Map<String, String>> partitions,
boolean ignoreIfExists,
@Nullable List<PartitionStatistics> statistics,
- boolean replaceStatistics)
+ boolean replaceStatistics,
+ @Nullable List<String> partitionLocations)
Review Comment:
**[P1] Preserve the existing public overload.** This replaces the
five-argument `createPartitions(identifier, partitions, ignoreIfExists,
statistics, replaceStatistics)` method that exists on the base branch of the
`@Public` `Catalog` interface. Existing source integrations will no longer
compile and already-compiled callers can fail with `NoSuchMethodError`; an
existing catalog implementation that overrides only the old method is also
bypassed by new six-argument callers, potentially dropping statistics through
the default fallback. Please keep the old overload and make the new overload
delegate to it when `partitionLocations` is null (and retain analogous bridges
in `RESTApi` and `FormatTablePartitionManager`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]