JingsongLi commented on code in PR #9540:
URL: https://github.com/apache/paimon/pull/9540#discussion_r3921081037
##########
paimon-api/src/main/java/org/apache/paimon/rest/RESTApi.java:
##########
@@ -996,20 +996,24 @@ public void markDonePartitions(Identifier identifier,
List<Map<String, String>>
* PartitionStatistics#spec()} rather than by position, 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, and not sent at all
in that case
+ * @param partitionLocations custom locations aligned with {@code
partitions} by position, where
+ * null entries use derived defaults; null omits the location extension
* @return the partitions the server created and the ones it already held
*/
public CreatePartitionsResponse createPartitions(
Identifier identifier,
List<Map<String, String>> partitions,
boolean ignoreIfExists,
@Nullable List<PartitionStatistics> statistics,
- boolean replaceStatistics) {
+ boolean replaceStatistics,
+ @Nullable List<String> partitionLocations) {
CreatePartitionsRequest request =
new CreatePartitionsRequest(
partitions,
ignoreIfExists,
statistics,
- statistics == null ? null : replaceStatistics);
+ statistics == null ? null : replaceStatistics,
+ partitionLocations);
Review Comment:
**[P1] Do not send locations through a route that legacy servers accept
silently.** A pre-feature server deserializes this request with
`@JsonIgnoreProperties(ignoreUnknown = true)`, so it discards
`partitionLocations`, registers the spec at the derived default location, and
returns the unchanged successful response. The new client therefore treats `ADD
PARTITION ... LOCATION` as successful even though later scans will not read the
requested external directory. The current mock `501` test only models an
upgraded server that recognizes the field. Please use a location-specific
endpoint or a mandatory capability/response acknowledgement that an old server
cannot accidentally satisfy, and add a mixed-version test against the base DTO
behavior.
--
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]