Merge pull request #914 from metamx/fix-cardinality-caching

fix cardinality aggregator caching
This commit is contained in:
xvrl 2014-11-26 16:56:17 -08:00
commit 34fb2f10b6
1 changed files with 2 additions and 1 deletions

View File

@ -214,9 +214,10 @@ public class CardinalityAggregatorFactory implements AggregatorFactory
{
byte[] fieldNameBytes = Joiner.on("\u0001").join(fieldNames).getBytes(Charsets.UTF_8);
return ByteBuffer.allocate(1 + fieldNameBytes.length)
return ByteBuffer.allocate(2 + fieldNameBytes.length)
.put(CACHE_TYPE_ID)
.put(fieldNameBytes)
.put((byte)(byRow ? 1 : 0))
.array();
}