mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
update tuple comparison.
This commit is contained in:
parent
5289b67b70
commit
187cc83702
@ -960,6 +960,9 @@ private:
|
||||
void executeTupleEqualityImpl(Block & block, size_t result, const ColumnsWithTypeAndName & x, const ColumnsWithTypeAndName & y,
|
||||
size_t tuple_size, size_t input_rows_count)
|
||||
{
|
||||
if (0 == tuple_size)
|
||||
throw Exception("Comparison of zero-sized tuples is not implemented.", ErrorCodes::NOT_IMPLEMENTED);
|
||||
|
||||
auto func_compare = ComparisonFunction::create(context);
|
||||
auto func_convolution = ConvolutionFunction::create(context);
|
||||
|
||||
@ -979,6 +982,13 @@ private:
|
||||
impl->execute(tmp_block, {i * 3, i * 3 + 1}, i * 3 + 2, input_rows_count);
|
||||
}
|
||||
|
||||
if (tuple_size == 1)
|
||||
{
|
||||
/// Do not call AND for single-element tuple.
|
||||
block.getByPosition(result).column = tmp_block.getByPosition(2).column;
|
||||
return;
|
||||
}
|
||||
|
||||
/// Logical convolution.
|
||||
tmp_block.insert({ nullptr, std::make_shared<DataTypeUInt8>(), "" });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user