Skip to content

Commit 03c959b

Browse files
committed
chore: remove unnecessary comma parsing method
1 parent 7c0d602 commit 03c959b

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

client/src/main/java/com/influxdb/client/internal/InfluxQLQueryApiImpl.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,8 @@ static InfluxQLQueryResult readInfluxQLResult(
162162
Arrays.asList(name, finalTags),
163163
n -> new InfluxQLQueryResult.Series(name, finalTags, finalHeaderCols)
164164
);
165-
// System.out.println("DEBUG finalHeaderCols: " + finalHeaderCols + " dynamiColumnsStartIndex: " + dynamicColumnsStartIndex);
166-
//getCSVField(csvRecord, headerCols.get("time") + dynamicColumnsStartIndex);
167165
Object[] values = headerCols.entrySet().stream().map(entry -> {
168-
// String value = csvRecord.get(entry.getValue() + dynamicColumnsStartIndex);
169-
String value = getCSVField(csvRecord, entry.getValue() + dynamicColumnsStartIndex);
166+
String value = csvRecord.get(entry.getValue() + dynamicColumnsStartIndex);
170167
if (valueExtractor != null) {
171168
return valueExtractor.extractValue(entry.getKey(), value, resultIndex, serie.getName());
172169
}
@@ -187,26 +184,6 @@ static InfluxQLQueryResult readInfluxQLResult(
187184
return new InfluxQLQueryResult(results);
188185
}
189186

190-
// Need to fixup any fields that might have contained a commented comma
191-
private static String getCSVField(CSVRecord record, int col_index) {
192-
ArrayList<String> fixupValues = new ArrayList<>();
193-
StringBuilder sb = new StringBuilder();
194-
for (int i = 0; i < record.size(); i++) {
195-
// System.out.println("DEBUG record.values()["+ i + "]: " + record.values()[i]);
196-
if(record.values()[i].endsWith("\\")){
197-
sb.append(record.get(i)).append(",");
198-
} else {
199-
sb.append(record.get(i));
200-
fixupValues.add(sb.toString());
201-
sb.delete(0, sb.length());
202-
}
203-
}
204-
// System.out.println("DEBUG fixupValues: " + fixupValues);
205-
// System.out.println("DEBUG co_index: " + col_index + " fixupValues.size: " + fixupValues.size());
206-
// System.out.println("DEBUG result: " + fixupValues.get(col_index));
207-
return fixupValues.get(col_index);
208-
}
209-
210187
private static int IndexOfUnescapedChar(String str, char ch) {
211188
char[] chars = str.toCharArray();
212189
for (int i = 0; i < chars.length; i++) {

0 commit comments

Comments
 (0)