Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,23 @@ public class ColumnParser implements ValueParser {
private final String fieldName;

public ColumnParser(Column expr) {
this.fieldName = expr.toString();
this.fieldName = this.formatFieldName(expr.toString());
}

public ColumnParser(Function expr) {
this.fieldName = expr.toString();
this.fieldName = this.formatFieldName(expr.toString());
}

private String formatFieldName(String rawFieldName) {
String tmpFieldName = rawFieldName;
if (tmpFieldName.startsWith("`")) {
tmpFieldName = tmpFieldName.substring(1);
}
if (tmpFieldName.endsWith("`")) {
tmpFieldName = tmpFieldName.substring(0, tmpFieldName.length() - 1);
}
return tmpFieldName;
}
/**
* parse
* @param sourceData
Expand Down
Loading