From 0289074ffec1b51e24475570271c6509845a5c35 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 25 Apr 2017 17:22:07 +0900 Subject: [PATCH 1/2] ing resultsetcol --- .../overflow/crawler/result/OFResultSetCol.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java b/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java index 0028bec..5d22826 100644 --- a/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java +++ b/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java @@ -21,6 +21,12 @@ public class OFResultSetCol extends OFResultSet{ List meta = this.item.getQuery().getKeys(); + String[] columns = (String[])this.item.getQuery().getQueryInfo().get("arrayColumns"); + + for( int indexI = 0 ; indexI < columns.length; ++indexI) { + meta.add(columns[indexI]); + } + if(this.meta == null) { this.meta = new HashMap<>(); } @@ -34,7 +40,7 @@ public class OFResultSetCol extends OFResultSet{ public Map parse() { List metrics = this.item.getMetrics(); - String[] arrayColumns = (String[])this.item.getQuery().getQueryInfo().get("arrayColumns"); + List arrayColumns = (List)this.item.getQuery().getQueryInfo().get("arrayColumns"); // this.meta Map resultMap = new HashMap<>(); @@ -54,8 +60,8 @@ public class OFResultSetCol extends OFResultSet{ arrayValue.clear(); - for(int indexL =0; indexL < arrayColumns.length; ++indexL) { - columnIdx = this.meta.get(arrayColumns[indexL]); + for(int indexL =0; indexL < arrayColumns.size(); ++indexL) { + columnIdx = this.meta.get(arrayColumns.get(indexL)); arrayValue.add(row.get(columnIdx)); } From fbf9a9697464e378708ffb15835ef2d61055b592 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 25 Apr 2017 17:24:13 +0900 Subject: [PATCH 2/2] ing resultsetcol --- .../com/loafle/overflow/crawler/result/OFResultSetCol.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java b/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java index 5d22826..7f9100b 100644 --- a/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java +++ b/src/main/java/com/loafle/overflow/crawler/result/OFResultSetCol.java @@ -21,10 +21,10 @@ public class OFResultSetCol extends OFResultSet{ List meta = this.item.getQuery().getKeys(); - String[] columns = (String[])this.item.getQuery().getQueryInfo().get("arrayColumns"); + List arrayColumns = (List)this.item.getQuery().getQueryInfo().get("arrayColumns"); - for( int indexI = 0 ; indexI < columns.length; ++indexI) { - meta.add(columns[indexI]); + for( int indexI = 0 ; indexI < arrayColumns.size(); ++indexI) { + meta.add(arrayColumns.get(indexI)); } if(this.meta == null) {