[bugfix](paimon)Fix field case issues for 2.1 (#36288)

bp:  #36239
This commit is contained in:
wuwenchi
2024-06-17 18:38:00 +08:00
committed by GitHub
parent b6aa17ae32
commit 4008a04da7
5 changed files with 58 additions and 29 deletions

View File

@ -80,7 +80,7 @@ public class PaimonExternalTable extends ExternalTable {
List<DataField> columns = schema.fields();
List<Column> tmpSchema = Lists.newArrayListWithCapacity(columns.size());
for (DataField field : columns) {
tmpSchema.add(new Column(field.name(),
tmpSchema.add(new Column(field.name().toLowerCase(),
paimonTypeToDorisType(field.type()), true, null, true, field.description(), true,
field.id()));
}

View File

@ -45,7 +45,7 @@ public class PaimonPredicateConverter {
public PaimonPredicateConverter(RowType rowType) {
this.builder = new PredicateBuilder(rowType);
this.fieldNames = rowType.getFields().stream().map(DataField::name).collect(Collectors.toList());
this.fieldNames = rowType.getFields().stream().map(f -> f.name().toLowerCase()).collect(Collectors.toList());
this.paimonFieldTypes = rowType.getFields().stream().map(DataField::type).collect(Collectors.toList());
}