private void SetValue0(long rowID, string value, PartitionTxData tx) { var symbolCache = tx.ReadCache.GetCache(_partitionID, _columnId, _cacheCapacity); var key = symbolCache.GetRowID(value); if (key == NOT_FOUND_VALUE) { key = AddKey(value, symbolCache, tx); } _data.WriteInt32(rowID * INT32_SIZE, key); if (_isIndexed) { _datarIndex.Add(key, rowID, tx); } }
private int AddKey(string value, SymbolCache symbolCache, PartitionTxData tx) { var hashKey = HashKey(value, _capacity); var key = CheckKeySlow(value, hashKey, symbolCache, tx); if (key == NOT_FOUND_VALUE) { var appendOffset = tx.AppendOffset[_symiFileID]; key = (int)(appendOffset / STRING_INDEX_FILE_RECORD_SIZE); _globalSymColumn.SetString(key, value, tx); _symrIndex.Add(hashKey, key, tx); if (value == null) { key = MetadataConstants.NULL_SYMBOL_VALUE; } symbolCache.SetRowID(value, key); } return(key); }