This is an automated email from the ASF dual-hosted git repository.
yuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git
The following commit(s) were added to refs/heads/main by this push:
new e51f72bb9 [hotfix] Use literal directly instead of
PARTITION_GENERATE_LEGCY_NAME to avoid NoSuchField error (#1880)
e51f72bb9 is described below
commit e51f72bb9c956f65fee34c71b2527dd72eafe8af
Author: yuxia Luo <[email protected]>
AuthorDate: Wed Oct 29 16:09:53 2025 +0800
[hotfix] Use literal directly instead of PARTITION_GENERATE_LEGCY_NAME to
avoid NoSuchField error (#1880)
---
.../org/apache/fluss/lake/paimon/utils/PaimonConversions.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git
a/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java
b/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java
index 2c42c471e..1f57ba3b6 100644
---
a/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java
+++
b/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java
@@ -49,6 +49,13 @@ import static
org.apache.fluss.lake.paimon.PaimonLakeCatalog.SYSTEM_COLUMNS;
/** Utils for conversion between Paimon and Fluss. */
public class PaimonConversions {
+ // use literal directly, a future paimon version will rename
+ // the variable PARTITION_GENERATE_LEGCY_NAME to
PARTITION_GENERATE_LEGACY_NAME, use literal
+ // can help avoid NoSuchField error
+ // todo: after upgrade paimon version, we call fall back to use
PARTITION_GENERATE_LEGACY_NAME
+ // again
+ private static final String PARTITION_GENERATE_LEGACY_NAME_OPTION_KEY =
"partition.legacy-name";
+
// for fluss config
private static final String FLUSS_CONF_PREFIX = "fluss.";
// for paimon config
@@ -60,7 +67,7 @@ public class PaimonConversions {
static {
PAIMON_UNSETTABLE_OPTIONS.add(CoreOptions.BUCKET.key());
PAIMON_UNSETTABLE_OPTIONS.add(CoreOptions.BUCKET_KEY.key());
-
PAIMON_UNSETTABLE_OPTIONS.add(CoreOptions.PARTITION_GENERATE_LEGCY_NAME.key());
+
PAIMON_UNSETTABLE_OPTIONS.add(PARTITION_GENERATE_LEGACY_NAME_OPTION_KEY);
}
public static RowKind toRowKind(ChangeType changeType) {
@@ -219,7 +226,7 @@ public class PaimonConversions {
private static void setPaimonDefaultProperties(Options options) {
// set partition.legacy-name to false, otherwise paimon will use
toString for all types,
// which will cause inconsistent partition value for the same binary
value
- options.set(CoreOptions.PARTITION_GENERATE_LEGCY_NAME, false);
+ options.set(PARTITION_GENERATE_LEGACY_NAME_OPTION_KEY,
Boolean.FALSE.toString());
}
private static void setFlussPropertyToPaimon(String key, String value,
Options options) {