Search in sources :

Example 6 with DataMapRowImpl

use of org.apache.carbondata.core.indexstore.row.DataMapRowImpl in project carbondata by apache.

the class BlockletDataMap method convertToRow.

private DataMapRow convertToRow(IndexKey key) {
    ByteBuffer buffer = ByteBuffer.allocate(key.getDictionaryKeys().length + key.getNoDictionaryKeys().length + 8);
    buffer.putInt(key.getDictionaryKeys().length);
    buffer.putInt(key.getNoDictionaryKeys().length);
    buffer.put(key.getDictionaryKeys());
    buffer.put(key.getNoDictionaryKeys());
    DataMapRowImpl dataMapRow = new DataMapRowImpl(unsafeMemoryDMStore.getSchema());
    dataMapRow.setByteArray(buffer.array(), 0);
    return dataMapRow;
}
Also used : ByteBuffer(java.nio.ByteBuffer) DataMapRowImpl(org.apache.carbondata.core.indexstore.row.DataMapRowImpl)

Aggregations

DataMapRowImpl (org.apache.carbondata.core.indexstore.row.DataMapRowImpl)6 DataMapRow (org.apache.carbondata.core.indexstore.row.DataMapRow)4 CarbonRowSchema (org.apache.carbondata.core.indexstore.schema.CarbonRowSchema)4 IOException (java.io.IOException)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 MemoryException (org.apache.carbondata.core.memory.MemoryException)2 BlockletMinMaxIndex (org.apache.carbondata.core.metadata.blocklet.index.BlockletMinMaxIndex)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutput (java.io.DataOutput)1 DataOutputStream (java.io.DataOutputStream)1 ByteBuffer (java.nio.ByteBuffer)1 SegmentProperties (org.apache.carbondata.core.datastore.block.SegmentProperties)1 TableBlockInfo (org.apache.carbondata.core.datastore.block.TableBlockInfo)1 BlockMetaInfo (org.apache.carbondata.core.indexstore.BlockMetaInfo)1 BlockletInfo (org.apache.carbondata.core.metadata.blocklet.BlockletInfo)1 DataFileFooter (org.apache.carbondata.core.metadata.blocklet.DataFileFooter)1 BlockletIndex (org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex)1 ColumnSchema (org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema)1 DataFileFooterConverter (org.apache.carbondata.core.util.DataFileFooterConverter)1 CarbonTablePath (org.apache.carbondata.core.util.path.CarbonTablePath)1