Revert "dbms: improving performance of String IN (set) (for graphite) [#METR-2944]."

This reverts commit 504894305d02e73c471e0020057d4b7a96afca1d.
This commit is contained in:
Alexey Milovidov 2015-02-13 07:08:25 +03:00
parent 7c8f3267be
commit 2017ee72c9

View File

@ -472,23 +472,12 @@ void Set::executeOrdinary(const ConstColumnPlainPtrs & key_columns, ColumnUInt8:
const ColumnString::Offsets_t & offsets = column_string->getOffsets();
const ColumnString::Chars_t & data = column_string->getChars();
StringRef prev_key;
bool prev_result;
/// Для всех строчек
for (size_t i = 0; i < rows; ++i)
{
/// Строим ключ
StringRef ref(&data[i == 0 ? 0 : offsets[i - 1]], (i == 0 ? offsets[i] : (offsets[i] - offsets[i - 1])) - 1);
if (i != 0 && ref == prev_key)
vec_res[i] = prev_result;
else
{
prev_result = negative ^ (set.end() != set.find(ref));
prev_key = ref;
vec_res[i] = prev_result;
}
vec_res[i] = negative ^ (set.end() != set.find(ref));
}
}
else if (const ColumnFixedString * column_string = typeid_cast<const ColumnFixedString *>(&column))