This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 0ff663242 [hive] Reuse table StorageDescriptor info (#3269)
0ff663242 is described below
commit 0ff66324281de4589ca98a6f9782bb99ad67111b
Author: Askwang <[email protected]>
AuthorDate: Tue Apr 30 07:28:40 2024 +0800
[hive] Reuse table StorageDescriptor info (#3269)
---
.../src/main/java/org/apache/paimon/hive/HiveCatalog.java | 4 ++--
1 file changed, 2 insertions(+), 2 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 06dbc5a2b..0d71e70a6 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
@@ -512,12 +512,12 @@ public class HiveCatalog extends AbstractCatalog {
}
private void updateHmsTable(Table table, Identifier identifier,
TableSchema schema) {
- StorageDescriptor sd = new StorageDescriptor();
+ StorageDescriptor sd = table.getSd() != null ? table.getSd() : new
StorageDescriptor();
sd.setInputFormat(INPUT_FORMAT_CLASS_NAME);
sd.setOutputFormat(OUTPUT_FORMAT_CLASS_NAME);
- SerDeInfo serDeInfo = new SerDeInfo();
+ SerDeInfo serDeInfo = sd.getSerdeInfo() != null ? sd.getSerdeInfo() :
new SerDeInfo();
serDeInfo.setParameters(new HashMap<>());
serDeInfo.setSerializationLib(SERDE_CLASS_NAME);
sd.setSerdeInfo(serDeInfo);