Skip to content

Commit

Permalink
fix(client): remove duplicated key header (#328)
Browse files Browse the repository at this point in the history
bug 原因是客户端重复添加了一个key 列头:进行了修正
  • Loading branch information
aqni authored May 9, 2024
1 parent 9e049a4 commit 9ab0572
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,15 +570,9 @@ private static void processExportCsv(QueryDataSet res) throws SessionException,

try {
CSVPrinter printer = getCSVBuilder(exportCSV).build().print(new PrintWriter(file));
boolean hasKey = res.getColumnList().get(0).equals(GlobalConstant.KEY_NAME);

if (exportCSV.isExportHeader) {
List<String> headerNames = new ArrayList<>();
if (hasKey) {
headerNames.add(GlobalConstant.KEY_NAME);
}
headerNames.addAll(res.getColumnList());
printer.printRecord(headerNames);
printer.printRecord(res.getColumnList());
}

while (res.hasMore()) {
Expand Down

0 comments on commit 9ab0572

Please sign in to comment.