Skip to content

Commit

Permalink
[INLONG-10768][Sort] Csv utils support specified the max split field …
Browse files Browse the repository at this point in the history
…size
  • Loading branch information
vernedeng committed Aug 9, 2024
1 parent 2db25da commit 377faec
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ public static String[][] splitCsv(
return splitCsv(text, delimiter, escapeChar, quoteChar, lineDelimiter, deleteHeadDelimiter, null);
}


/**
* Splits the csv text, which may contains multiple lines of data.
*
Expand Down Expand Up @@ -457,7 +456,7 @@ public static String[][] splitCsv(
fields.add(field);
stringBuilder.setLength(0);

splittedSize ++;
splittedSize++;
// if the last field, mark the last filed start index
if (maxFieldSize != null && splittedSize == maxFieldSize - 1) {
if (i + 1 < text.length()) {
Expand Down

0 comments on commit 377faec

Please sign in to comment.