This is an automated email from the ASF dual-hosted git repository.

luoyuxia 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 de693bca1 [catalog] Preserve exception cause when rethrowing catalog 
exceptions (#3281)
de693bca1 is described below

commit de693bca1c295c0fdca3a33086404db8b28c007f
Author: ForwardXu <[email protected]>
AuthorDate: Sat May 9 10:11:31 2026 +0800

    [catalog] Preserve exception cause when rethrowing catalog exceptions 
(#3281)
---
 .../src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java  | 6 +++---
 .../main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java   | 2 +-
 .../org/apache/fluss/server/coordinator/CoordinatorService.java     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java
 
b/fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java
index 3cb46aa78..8781cd674 100644
--- 
a/fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java
+++ 
b/fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java
@@ -519,9 +519,9 @@ public class FlinkCatalog extends AbstractCatalog {
             } else if (CatalogExceptionUtils.isTableAlreadyExist(t)) {
                 throw new TableAlreadyExistException(getName(), objectPath);
             } else if (CatalogExceptionUtils.isLakeTableAlreadyExist(t)) {
-                throw new CatalogException(t.getMessage());
+                throw new CatalogException(t.getMessage(), t);
             } else if (isTableInvalid(t)) {
-                throw new InvalidTableException(t.getMessage());
+                throw new InvalidTableException(t.getMessage(), t);
             } else {
                 throw new CatalogException(
                         String.format("Failed to create table %s in %s", 
objectPath, getName()), t);
@@ -565,7 +565,7 @@ public class FlinkCatalog extends AbstractCatalog {
             if (CatalogExceptionUtils.isTableNotExist(t)) {
                 throw new TableNotExistException(getName(), objectPath);
             } else if (isTableInvalid(t)) {
-                throw new InvalidTableException(t.getMessage());
+                throw new InvalidTableException(t.getMessage(), t);
             } else {
                 throw new CatalogException(
                         String.format("Failed to alter table %s in %s", 
objectPath, getName()), t);
diff --git 
a/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java
 
b/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java
index 6548b7e26..738f659dd 100644
--- 
a/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java
+++ 
b/fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java
@@ -151,7 +151,7 @@ public class PaimonLakeCatalog implements LakeCatalog {
             }
         } catch (Catalog.ColumnAlreadyExistException | 
Catalog.ColumnNotExistException e) {
             // This shouldn't happen for AddColumn operations
-            throw new InvalidAlterTableException(e.getMessage());
+            throw new InvalidAlterTableException(e.getMessage(), e);
         } catch (Catalog.TableNotExistException e) {
             throw new TableNotExistException("Table " + tablePath + " does not 
exist.");
         }
diff --git 
a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java
 
b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java
index b5cec6a0e..bdc97434e 100644
--- 
a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java
+++ 
b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java
@@ -442,10 +442,10 @@ public final class CoordinatorService extends 
RpcServiceBase implements Coordina
         } catch (Exception e) {
             if (e instanceof UncheckedIOException) {
                 throw new InvalidTableException(
-                        "Failed to parse table descriptor: " + e.getMessage());
+                        "Failed to parse table descriptor: " + e.getMessage(), 
e);
             } else {
                 // wrap the validate message to InvalidTableException
-                throw new InvalidTableException(e.getMessage());
+                throw new InvalidTableException(e.getMessage(), e);
             }
         }
 

Reply via email to