|
|
@@ -119,15 +119,15 @@ public class ShowPopulationService {
|
|
|
List<String> operatorOther = new ArrayList<>();
|
|
|
String next = null;
|
|
|
while (operatorsList.hasNext()){
|
|
|
- next = operatorsList.next().toLowerCase();
|
|
|
+ next = operatorsList.next();
|
|
|
//计算25th,75th,和百分比
|
|
|
- if (next.toUpperCase() == "PERCENT" || "PERCENT".equals(next.toUpperCase())){
|
|
|
- String op = "count(" + columnName + ")/(select count(1) from " + tableName + ") "+ next;
|
|
|
+ if ("PERCENT".equalsIgnoreCase(next)){
|
|
|
+ String op = "count(" + columnName + ")/(select count(1) from " + tableName + ") \""+ next + "\"";
|
|
|
operatorColumn.add(op);
|
|
|
- }else if ("25th".equals(next) || "75th".equals(next)){
|
|
|
+ }else if ("25th".equalsIgnoreCase(next) || "75th".equalsIgnoreCase(next)){
|
|
|
operatorOther.add(next);
|
|
|
}else {
|
|
|
- String op = next + "(" + columnName + ") as " + next.toLowerCase();
|
|
|
+ String op = next + "(" + columnName + ") as \"" + next + "\"";
|
|
|
operatorColumn.add(op);
|
|
|
}
|
|
|
}
|