[fix](Export) Fix an export error when lower_case_table_names=1 (#28389)

This commit is contained in:
Tiewei Fang
2023-12-17 20:45:43 +08:00
committed by GitHub
parent 0f3c544260
commit 9b3d4bb5bc

View File

@ -458,7 +458,11 @@ public class ExportJob implements Writable {
int end = i + MAXIMUM_TABLETS_OF_OUTFILE_IN_EXPORT < tabletsList.size()
? i + MAXIMUM_TABLETS_OF_OUTFILE_IN_EXPORT : tabletsList.size();
List<Long> tablets = new ArrayList<>(tabletsList.subList(i, end));
TableRef tblRef = new TableRef(this.tableRef.getName(), this.tableRef.getAlias(),
// Since export does not support the alias, here we pass the null value.
// we can not use this.tableRef.getAlias(),
// because the constructor of `Tableref` will convert this.tableRef.getAlias()
// into lower case when lower_case_table_names = 1
TableRef tblRef = new TableRef(this.tableRef.getName(), null,
this.tableRef.getPartitionNames(), (ArrayList) tablets,
this.tableRef.getTableSample(), this.tableRef.getCommonHints());
tableRefList.add(tblRef);