You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "LiebingYu (via GitHub)" <gi...@apache.org> on 2026/03/05 08:02:45 UTC
[PR] [lake/paimon] Support Altering Lake Table Properties [fluss]
LiebingYu opened a new pull request, #2799:
URL: https://github.com/apache/fluss/pull/2799
<!--
*Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/fluss/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
- Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #2795
<!-- What is the purpose of the change -->
### Brief change log
<!-- Please describe the changes made in this pull request and explain how they address the issue -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [lake/paimon] Support Altering Lake Table Properties [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia merged PR #2799:
URL: https://github.com/apache/fluss/pull/2799
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [lake/paimon] Support Altering Lake Table Properties [fluss]
Posted by "LiebingYu (via GitHub)" <gi...@apache.org>.
LiebingYu commented on code in PR #2799:
URL: https://github.com/apache/fluss/pull/2799#discussion_r2903044407
##########
fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java:
##########
@@ -275,6 +274,14 @@ private static void validatePaimonOptions(Map<String, String> properties) {
});
}
+ private static void validateAlterPaimonOptions(String key) {
+ if (PAIMON_UNSETTABLE_OPTIONS.contains(key)
+ || CoreOptions.IMMUTABLE_OPTIONS.contains(key)) {
Review Comment:
Currently, Flink doesn't support to alter `bucket.num`.
If we support to alter `bucket.num` in the future, we should change `PAIMON_UNSETTABLE_OPTIONS ` to `PAIMON_UNALTERABLE_OPTIONS` here (because `bucket` exists in `PAIMON_UNSETTABLE_OPTIONS `). But I think we ok to use `PAIMON_UNSETTABLE_OPTIONS ` here for now?
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [lake/paimon] Support Altering Lake Table Properties [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #2799:
URL: https://github.com/apache/fluss/pull/2799#discussion_r2903004906
##########
fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java:
##########
@@ -275,6 +274,14 @@ private static void validatePaimonOptions(Map<String, String> properties) {
});
}
+ private static void validateAlterPaimonOptions(String key) {
+ if (PAIMON_UNSETTABLE_OPTIONS.contains(key)
+ || CoreOptions.IMMUTABLE_OPTIONS.contains(key)) {
Review Comment:
`bucket.num` is not in `IMMUTABLE_OPTIONS`, but actually, in fluss case, it shouldn't change. Maybe we need to add more to unsupported options.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [lake/paimon] Support Altering Lake Table Properties [fluss]
Posted by "LiebingYu (via GitHub)" <gi...@apache.org>.
LiebingYu commented on PR #2799:
URL: https://github.com/apache/fluss/pull/2799#issuecomment-4011184846
CC @luoyuxia
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [lake/paimon] Support Altering Lake Table Properties [fluss]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2799:
URL: https://github.com/apache/fluss/pull/2799#discussion_r2902863819
##########
fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java:
##########
@@ -275,6 +274,14 @@ private static void validatePaimonOptions(Map<String, String> properties) {
});
}
+ private static void validateAlterPaimonOptions(String key) {
+ if (PAIMON_UNSETTABLE_OPTIONS.contains(key)
+ || CoreOptions.IMMUTABLE_OPTIONS.contains(key)) {
+ throw new InvalidConfigException(
+ String.format("The Paimon option %s cannot be changed.", key));
Review Comment:
`validateAlterPaimonOptions` receives the converted Paimon key (e.g., `paimon.bucket` becomes `bucket`), so the thrown error message will refer to the stripped key. This is inconsistent with create-time validation (which reports the original user-specified key) and can be confusing to users troubleshooting ALTER TABLE failures. Consider including the original Fluss property key in the exception message (or re-attaching the `paimon.` prefix when applicable) so the error points to exactly what the user set/reset.
```suggestion
String displayKey = key;
if (!displayKey.startsWith(PAIMON_CONF_PREFIX)) {
displayKey = PAIMON_CONF_PREFIX + displayKey;
}
if (PAIMON_UNSETTABLE_OPTIONS.contains(key)
|| CoreOptions.IMMUTABLE_OPTIONS.contains(key)) {
throw new InvalidConfigException(
String.format("The Paimon option %s cannot be changed.", displayKey));
```
##########
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/catalog/FlinkCatalogITCase.java:
##########
@@ -286,16 +286,8 @@ void testAlterTableConfig() throws Exception {
.hasMessage("The option 'bootstrap.servers' is not supported to alter yet.");
String unSupportedDml6 =
- "alter table test_alter_table_append_only set ('paimon.file.format' = 'orc')";
- assertThatThrownBy(() -> tEnv.executeSql(unSupportedDml6))
- .rootCause()
- .isInstanceOf(InvalidConfigException.class)
- .hasMessage(
- "Property 'paimon.file.format' is not supported to alter which is for datalake table.");
-
- String unSupportedDml7 =
"alter table test_alter_table_append_only set ('auto-increment.fields' = 'b')";
- assertThatThrownBy(() -> tEnv.executeSql(unSupportedDml7))
+ assertThatThrownBy(() -> tEnv.executeSql(unSupportedDml6))
.rootCause()
.isInstanceOf(CatalogException.class)
.hasMessage("The option 'auto-increment.fields' is not supported to alter yet.");
Review Comment:
This test previously asserted that altering a lake-format-specific option via Flink SQL (e.g. a `paimon.*` key) fails. With the server-side restriction removed and validation moved into the lake implementation, that behavior should be re-asserted with the new expected outcome/message (and ideally also add a positive case for a changeable `paimon.*` option). As-is, the Flink SQL path no longer has coverage for ALTER TABLE SET/RESET of lake table properties, which is the main feature of this PR.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org