You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ka...@apache.org on 2017/09/04 13:44:41 UTC
[30/50] [abbrv] kylin git commit: #949 Refine column family for
measures
#949 Refine column family for measures
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a4aeb778
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a4aeb778
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a4aeb778
Branch: refs/heads/2622-2764
Commit: a4aeb77890577e46300bc702c1117bf542081cc9
Parents: d62cb58
Author: auphyroc99 <45...@qq.com>
Authored: Wed Aug 30 16:03:24 2017 +0800
Committer: Roger Shi <ro...@gmail.com>
Committed: Wed Aug 30 18:13:52 2017 +0800
----------------------------------------------------------------------
.../org/apache/kylin/gridtable/GTRecord.java | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/a4aeb778/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
index 862fb99..c3a160a 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
@@ -45,7 +45,7 @@ public class GTRecord implements Comparable<GTRecord>, Cloneable {
}
this.info = info;
}
-
+
@Override
public GTRecord clone() { // deep copy
ByteArray[] cols = new ByteArray[this.cols.length];
@@ -114,7 +114,6 @@ public class GTRecord implements Comparable<GTRecord>, Cloneable {
return result;
}
-
/** decode and return the values of this record */
public Object[] getValues(int[] selectedColumns, Object[] result) {
assert selectedColumns.length <= result.length;
@@ -295,27 +294,21 @@ public class GTRecord implements Comparable<GTRecord>, Cloneable {
buf.position(pos);
}
}
-
- public void loadColumnsFromColumnBlocks(ImmutableBitSet[] selectedColumnBlocks, ImmutableBitSet selectedCols, ByteBuffer buf) {
-
+
+ public void loadColumnsFromColumnBlocks(ImmutableBitSet[] selectedColumnBlocks, ImmutableBitSet selectedCols,
+ ByteBuffer buf) {
int pos = buf.position();
-
for (ImmutableBitSet selectedColBlock : selectedColumnBlocks) {
-
for (int i = 0; i < selectedColBlock.trueBitCount(); i++) {
-
int c = selectedColBlock.trueBitAt(i);
-
int len = info.codeSystem.codeLength(c, buf);
- if(selectedCols.get(c)) {
- cols[c].set(buf.array(), buf.arrayOffset() + pos, len);
+ if (selectedCols.get(c)) {
+ cols[c].set(buf.array(), buf.arrayOffset() + pos, len);
}
pos += len;
buf.position(pos);
}
-
}
-
}
}