[chore](multi catalog) Print serde properties when show create hive-external-table (#34966) (#37096)

bp #34966

Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>
This commit is contained in:
Mingyu Chen
2024-07-02 11:07:10 +08:00
committed by GitHub
parent 6789f5bc80
commit a9764b9d39
2 changed files with 61 additions and 0 deletions

View File

@ -756,6 +756,13 @@ public class HiveMetaStoreClientHelper {
output.append("ROW FORMAT SERDE\n")
.append(String.format(" '%s'\n", descriptor.getSerdeInfo().getSerializationLib()));
}
if (descriptor.getSerdeInfo().isSetParameters()) {
output.append("WITH SERDEPROPERTIES (\n")
.append(descriptor.getSerdeInfo().getParameters().entrySet().stream()
.map(entry -> String.format(" '%s' = '%s'", entry.getKey(), entry.getValue()))
.collect(Collectors.joining(",\n")))
.append(")\n");
}
if (descriptor.isSetInputFormat()) {
output.append("STORED AS INPUTFORMAT\n")
.append(String.format(" '%s'\n", descriptor.getInputFormat()));