Merge remote-tracking branch 'origin/master'

This commit is contained in:
snoop 2017-04-25 18:42:13 +09:00
commit 20a5664794

View File

@ -68,14 +68,11 @@ public class OFResultSetRow extends OFResultSet{
Query query = this.item.getQuery(); Query query = this.item.getQuery();
List<String> metrics = this.item.getMetrics(); List<String> metrics = this.item.getMetrics();
// 동적 키인지 일반 키들인지 체크해야함 // 일단은 동적 키적용
String metricsType = (String) query.getQueryInfo().get("metricsType");
List<String> arrayColumns = (List<String>) this.item.getQuery().getQueryInfo().get("arrayColumns"); List<String> arrayColumns = (List<String>) this.item.getQuery().getQueryInfo().get("arrayColumns");
List<String> keyColumns = (List<String>) this.item.getQuery().getQueryInfo().get("keyColumns"); List<String> keyColumns = (List<String>) this.item.getQuery().getQueryInfo().get("keyColumns");
List<String> keys = query.getKeys(); List<String> keys = query.getKeys();
boolean find = false; boolean find = false;
int findIndex = -1; int findIndex = -1;
for (String keyColumn: keyColumns) { for (String keyColumn: keyColumns) {
@ -92,14 +89,15 @@ public class OFResultSetRow extends OFResultSet{
String metric = metrics.get(findIndex); String metric = metrics.get(findIndex);
for (int i =0 ; i< arrayColumns.size() ; ++i) { if (arrayColumns != null) {
// replace for (int i =0 ; i< arrayColumns.size() ; ++i) {
String k = "$" + i; // replace
int dataIndex = this.meta.get(arrayColumns.get(i)); String k = "$" + i;
String replaceString = data.get(dataIndex); int dataIndex = this.meta.get(arrayColumns.get(i));
metric = metric.replace(k,"'" + replaceString + "'"); String replaceString = data.get(dataIndex);
metric = metric.replace(k,"'" + replaceString + "'");
}
} }
return metric; return metric;
} }