mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 10:10:50 +00:00
Revert "dbms: improving performance of String IN (set) (for graphite) [#METR-2944]."
This reverts commit 504894305d02e73c471e0020057d4b7a96afca1d.
This commit is contained in:
parent
7c8f3267be
commit
2017ee72c9
@ -472,23 +472,12 @@ void Set::executeOrdinary(const ConstColumnPlainPtrs & key_columns, ColumnUInt8:
|
|||||||
const ColumnString::Offsets_t & offsets = column_string->getOffsets();
|
const ColumnString::Offsets_t & offsets = column_string->getOffsets();
|
||||||
const ColumnString::Chars_t & data = column_string->getChars();
|
const ColumnString::Chars_t & data = column_string->getChars();
|
||||||
|
|
||||||
StringRef prev_key;
|
|
||||||
bool prev_result;
|
|
||||||
|
|
||||||
/// Для всех строчек
|
/// Для всех строчек
|
||||||
for (size_t i = 0; i < rows; ++i)
|
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);
|
StringRef ref(&data[i == 0 ? 0 : offsets[i - 1]], (i == 0 ? offsets[i] : (offsets[i] - offsets[i - 1])) - 1);
|
||||||
|
vec_res[i] = negative ^ (set.end() != set.find(ref));
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (const ColumnFixedString * column_string = typeid_cast<const ColumnFixedString *>(&column))
|
else if (const ColumnFixedString * column_string = typeid_cast<const ColumnFixedString *>(&column))
|
||||||
|
Loading…
Reference in New Issue
Block a user