[fix](Hudi-catalog) fix hudi catalog code (#27963)

In the original logic, `allfields.addall` will modify the objects in `hmsTable`.
This commit is contained in:
Tiewei Fang
2023-12-04 22:28:19 +08:00
committed by GitHub
parent 2b4c4bb442
commit 20d4d7eb2b

View File

@ -223,7 +223,8 @@ public class HudiScanNode extends HiveScanNode {
List<String> columnNames = new ArrayList<>();
List<String> columnTypes = new ArrayList<>();
List<FieldSchema> allFields = hmsTable.getRemoteTable().getSd().getCols();
List<FieldSchema> allFields = Lists.newArrayList();
allFields.addAll(hmsTable.getRemoteTable().getSd().getCols());
allFields.addAll(hmsTable.getRemoteTable().getPartitionKeys());
for (Schema.Field hudiField : hudiSchema.getFields()) {