From 5266bd06da71d31c8db9b7cd72c23c0234b2cfd9 Mon Sep 17 00:00:00 2001 From: zouxxyy Date: Wed, 20 Nov 2024 19:05:26 +0800 Subject: [PATCH] 1 --- .../main/java/org/apache/paimon/hive/HiveCatalog.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java index 1e63eeda63a9..93e7e87ef5c7 100644 --- a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java +++ b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java @@ -963,11 +963,12 @@ public void repairTable(Identifier identifier) throws TableNotExistException { } } catch (TableNotExistException e) { // hive table does not exist. - Table finalNewTable = - newTable == null - ? createHiveTable( - identifier, tableSchema, location, usingExternalTable()) - : newTable; + if (newTable == null) { + newTable = + createHiveTable( + identifier, tableSchema, location, usingExternalTable()); + } + Table finalNewTable = newTable; clients.execute(client -> client.createTable(finalNewTable)); }